Download the PHP package symfony/ux-leaflet-map without Composer
On this page you can find all versions of the php package symfony/ux-leaflet-map. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download symfony/ux-leaflet-map
More information about symfony/ux-leaflet-map
Files in symfony/ux-leaflet-map
Package ux-leaflet-map
Short Description Symfony UX Map Leaflet Bridge
License MIT
Homepage https://symfony.com
Informations about the package ux-leaflet-map
Symfony UX Map: Leaflet
Leaflet integration for Symfony UX Map.
DSN example
Map options
You can use the LeafletOptions
class to configure your Map
::
Use cases
Below are some common or advanced use cases when using a map.
Customize the marker
A common use case is to customize the marker. You can listen to the ux:map:marker:before-create
event to customize the marker before it is created.
Assuming you have a map with a custom controller:
You can create a Stimulus controller to customize the markers before they are created:
Known issues
Unable to find leaflet/dist/leaflet.min.css
file when using Webpack Encore
When using Webpack Encore with the Leaflet bridge, you may encounter the following error:
That's because the Leaflet's Stimulus controller references the leaflet/dist/leaflet.min.css
file,
which exists on jsDelivr (used by the Symfony AssetMapper component),
but does not in the leaflet
npm package.
The correct path is leaflet/dist/leaflet.css
, but it is not possible to fix it because it would break compatibility
with the Symfony AssetMapper component.
As a workaround, you can configure Webpack Encore to add an alias for the leaflet/dist/leaflet.min.css
file: