PHPackages                             kematjaya/leaflet-bundle - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kematjaya/leaflet-bundle

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kematjaya/leaflet-bundle
========================

provide map for get latitude and longitude base on leaflet.js

1.0.4(3y ago)2770MITJavaScript

Since Dec 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kematjaya0/leaflet-bundle)[ Packagist](https://packagist.org/packages/kematjaya/leaflet-bundle)[ RSS](/packages/kematjaya-leaflet-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (15)Used By (0)

leaflet-bundle
==============

[](#leaflet-bundle)

symfony bundle base on leaflet js for selecting location using map

1. Installation

```
composer kematjaya/leaflet-bundle

```

2. add to config/bundles.php

```
// add to config/bundles.php
...
Kematjaya\LeafletBundle\LeafletBundle::class => ['all' => true]
...

```

3. add to form

```
// src/Form/AddressType.php
...
use Kematjaya\LeafletBundle\Type\LeafletMapType
...
$builder
      ->add('location', LeafletMapType::class, [
          'label' => 'location',
          "map_height" => "350px", // default 250px
          "map_width" => "100%", // default 100%
      ]);
...

```

4. create configuration file config/packages/leaflet.yaml

```
leaflet:
    map_box:
        api_token: '%env(resolve:LEAFLET_MAPBOX_TOKEN)%'
    map:
        lock_map: true # lock map at center point, default true
        lock_coordinates:
            southwest: "-7.777488, 114.776975" # point lock
            northeast: "-7.403438, 110.834149" # point lock
        min_zoom: 8          # minimal zoom available, default 8
        max_zoom: 20         # maximal zoom available, default 20
        zoom_value: 11       # default zoom when map loaded
        on_click_zoom: 14    # zoom when map clicked, default 14
        center_point: '%env(resolve:LEAFLET_MAP_CENTER_POINT)%'
        zoom_point: '%env(resolve:LEAFLET_MAP_CENTER_POINT)%'

```

and add value to .env

```
LEAFLET_MAPBOX_TOKEN=your.mapbox.token
LEAFLET_MAP_CENTER_POINT=longlat point ## example: '-7.293421341699741, 112.73709354459358'

```

4. use distance calculator

```
...
use Kematjaya\LeafletBundle\Calculator\Point;
use Kematjaya\LeafletBundle\Calculator\DistanceCalculatorInterface;
...
public function test(DistanceCalculatorInterface $distanceCalculator)
{
    $from = new Point(-7.345728218434821, 112.76383132697055);
    $to = new Point(-7.2491223553386375, 112.79650342712807);

    $distance = $distanceCalculator->getDistance($from, $to); // in KM
}

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~28 days

Total

14

Last Release

1246d ago

Major Versions

0.6.1 → 1.02022-08-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2cf191329e1adc930a168a7d3baeda8517b7982184820692163a5baa72e3965?d=identicon)[kematjaya0](/maintainers/kematjaya0)

---

Top Contributors

[![kematjaya0](https://avatars.githubusercontent.com/u/36223951?v=4)](https://github.com/kematjaya0 "kematjaya0 (11 commits)")

### Embed Badge

![Health badge](/badges/kematjaya-leaflet-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/kematjaya-leaflet-bundle/health.svg)](https://phpackages.com/packages/kematjaya-leaflet-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[pixelopen/cloudflare-turnstile-bundle

A simple package to help integrate Cloudflare Turnstile on Symfony.

31205.8k3](/packages/pixelopen-cloudflare-turnstile-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

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