Download the PHP package symfony/ux-google-map without Composer
On this page you can find all versions of the php package symfony/ux-google-map. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download symfony/ux-google-map
More information about symfony/ux-google-map
Files in symfony/ux-google-map
Package ux-google-map
Short Description Symfony UX Map GoogleMaps Bridge
License MIT
Homepage https://symfony.com
Informations about the package ux-google-map
Symfony UX Map: Google Maps
Google Maps integration for Symfony UX Map.
Installation
Install the bridge using Composer and Symfony Flex:
If you're using WebpackEncore, install your assets and restart Encore (not needed if you're using AssetMapper):
[!NOTE] Alternatively, @symfony/ux-google-map package can be used to install the JavaScript assets without requiring PHP.
DSN example
Available options:
| Option | Description | Default |
|---|---|---|
v |
The version of the Maps JavaScript API to load, could be a release channels or version numbers | weekly |
language |
The language to use, see list of supported languages specified in the browser | The user's preferred language |
region |
The region code to use, unicode region subtag identifiers compatible with ISO 3166-1 | |
libraries |
Additional libraries to load, see list of supported libraries | ['maps', 'marker'], those two libraries are always loaded |
authReferrerPolicy |
Set the referrer policy for the API requests | |
mapIds |
An array of map IDs to preload | |
channel |
Can be used to track your usage | |
solutionChannel |
Used by the Google Maps Platform to track adoption and usage of examples and solutions |
Map options
You can use the GoogleOptions 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:
Resources
All versions of ux-google-map with dependencies
symfony/stimulus-bundle Version ^2.18.1|^3.0
symfony/ux-map Version ^2.19|^3.0