PHPackages                             claonilton/leafletadianti - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. claonilton/leafletadianti

ActiveLibrary[Framework](/categories/framework)

claonilton/leafletadianti
=========================

Plugins for Adianti Framework

v0.1.0(8mo ago)067MITCSS

Since Aug 22Pushed 8mo agoCompare

[ Source](https://github.com/Claonilton/leafletadianti)[ Packagist](https://packagist.org/packages/claonilton/leafletadianti)[ RSS](/packages/claonilton-leafletadianti/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Criando mapa utilizando Leaflet Maps (opensource)
=================================================

[](#criando-mapa-utilizando-leaflet-maps-opensource)

> Funções em php para quem quer criar mapas sem manipular o javascript.

[![](https://camo.githubusercontent.com/63c94e2ccb558cd4a4c2708549c80398e993c4e60173b5daae5d761c75968e7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56455253c3834f2d312e302e312d677265656e)](https://camo.githubusercontent.com/63c94e2ccb558cd4a4c2708549c80398e993c4e60173b5daae5d761c75968e7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56455253c3834f2d312e302e312d677265656e)[![](https://camo.githubusercontent.com/49df435b1eeeb5fa880000e34744c927414eb80c1f985f0df6c1da1d362ffca0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656ec3a7612d474e5520332e302d73756363657373)](https://camo.githubusercontent.com/49df435b1eeeb5fa880000e34744c927414eb80c1f985f0df6c1da1d362ffca0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656ec3a7612d474e5520332e302d73756363657373)[![](https://camo.githubusercontent.com/875e32220beb4618c422b879af427a2b13c9b0f6d2c830542a27117df65610c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d416469616e74692d626c7565)](https://camo.githubusercontent.com/875e32220beb4618c422b879af427a2b13c9b0f6d2c830542a27117df65610c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d416469616e74692d626c7565)[![](https://camo.githubusercontent.com/07f481f0f8e1ef2d850909a2e2783e6135a7690ac69a624553a9d352bf77e432/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d3e372e322d626c756576696f6c6574)](https://camo.githubusercontent.com/07f481f0f8e1ef2d850909a2e2783e6135a7690ac69a624553a9d352bf77e432/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d3e372e322d626c756576696f6c6574)

[![](https://github.com/andre-gasparin/leafletadianti/raw/main/src/readme.png)](https://github.com/andre-gasparin/leafletadianti/blob/main/src/readme.png)

Link Leaflet.js:

Instalação
----------

[](#instalação)

Para instalar no Adianti Builder, vá na aba de "composer packages" e adicione:

```
andregasparin/leafletadianti
```

É necessário que você tenha o composer instalado.

Abra seu cmd (prompt), com o comando "cd c:/pasta/do/projeto" navegue até a raiz do seu projeto em adianti.

Execute o seguinte comando (podem variar no caso de usar linux ou mac, ex utilizar sudo no início):

```
composer require andregasparin/leafletadianti
```

Utilização
----------

[](#utilização)

Adicione a linha no início de onde você irá utilizar: use AndreGasparin\\Leafletadianti\\LeafletMap;

Depois utilize a classe e insira o mapa em qualquer element que desejar, exemplo:

```
show();

        $content = new TElement('div');
        $content->id = 'my-map';
        $content->add( $show_map );

        parent::add( $content );
    }
}
```

Exemplo de uso de todas as funções:

```
 50.505, 'lng'=> -0.09, 'description'];
        $points[] = ['lat' => 49.505, 'lng'=> -0.09, 'description49'];

        $points_json = json_encode($points);

        parent::__construct();

        $map = new LeafletMap('51.505','-0.09','13', 'google'); // set initial coordinates
        $map->setSize('100%', '400'); //set map size
        //$map->width = '100%';
        //$map->height = '600px';
        //$map->myLocation(true); // use gps to show and center my location, use true to display poupup with precision
        $map->addMarker('51.505', '-0.09', 'teste'); // add point on map
        $map->addJsonMarker($points_json);
        $map->center(); //center map to view all points
	$show_map = $map->show();

        //#Version 1.0.1
            $map->enableAddOnePoint('allPointsJson');
            $map->enableAddPoints('allPointsJson');
            //field
            $allPointsJson = new TEntry('allPointsJson');
            $allPointsJson->setSize("100%");
            parent::add( $allPointsJson );
        //#End Version 1.0.1

        //#Version 1.0.2
            $map->searchAddress('autocompleteLeaflet');
            $map = $map->show(); //create map
            //field
            $autocompleteLeaflet = new TCombo('autocompleteLeaflet');
            $autocompleteLeaflet->setSize("100%");
            parent::add( $autocompleteLeaflet );
        //#End Version 1.0.2

        $content = new TElement('div');
        $content->id = 'testediv';
        $content->add( $show_map );
        parent::add( $content );
    }
}
```

Configuração para Desenvolvimento
---------------------------------

[](#configuração-para-desenvolvimento)

Caso queira implementar algo no sistema, utilize os padrões do Adianti Framework, ficaremos felizes com sua participação!

Precisa de melhoria ou ajuda com algum BUG?
-------------------------------------------

[](#precisa-de-melhoria-ou-ajuda-com-algum-bug)

[Issues](https://github.com/andre-gasparin/leafletadianti/issues)

Histórico (ChangeLog)
---------------------

[](#histórico-changelog)

- 1.0.0
    - Projeto criado
- 1.0.1
    - adicionado enableAddOnePoint(RETORNO) Você pode adicionar um mapa que aceite apenas 1 marcador, o usuário tem a opção de clicar novamente no mapa e alterar o local. "Retorno" deve passar o nome do campo TEntry/THidden criado no formulário
    - adicionado enableAddPoints(RETORNO) Você pode adicionar um mapa que aceite vários marcadores, o usuário tem a opção de clicar novamente no marcador para exclui-lo. "Retorno" deve passar o nome do campo TEntry/THidden criado no formulário
- 1.0.2
    - adicionado searchAddress(RETORNO, addMarker) Você pode adicionar uma busca de geolocation, ou seja, pesquisa por endereço. "Retorno" deve passar o nome do campo TCombo criado no formulário "addMarker" = true, ele irá inserir automaticamente um alfinete no endereço localizado
- 1.0.3
    - pacote do composer criado
- 1.0.4
- 1.0.5
    - Correção de bugs

Meta
----

[](#meta)

André Gasparin – \[@andre-gasparin\] –  /

Distribuído sob a Licença Pública Geral GNU (GPLv3)

Contributing
------------

[](#contributing)

1. Faça o *fork* do projeto ()
2. Crie uma *branch* para sua modificação (`git checkout -b feature/fooBar`)
3. Faça o *commit* (`git commit -am 'Add some fooBar'`)
4. *Push* (`git push origin feature/fooBar`)
5. Crie um novo *Pull Request*

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance62

Regular maintenance activity

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 82.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

259d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a2cca6788990d069a410dd5708da0b9b631b9bb661b9cae201e749ae33227b6?d=identicon)[Claonilton](/maintainers/Claonilton)

---

Top Contributors

[![andre-gasparin](https://avatars.githubusercontent.com/u/55391441?v=4)](https://github.com/andre-gasparin "andre-gasparin (19 commits)")[![Claonilton](https://avatars.githubusercontent.com/u/16517344?v=4)](https://github.com/Claonilton "Claonilton (4 commits)")

### Embed Badge

![Health badge](/badges/claonilton-leafletadianti/health.svg)

```
[![Health](https://phpackages.com/badges/claonilton-leafletadianti/health.svg)](https://phpackages.com/packages/claonilton-leafletadianti)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M255](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M120](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
