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 |
---|---|---|
id |
The id of the script tag | __googleMapsScriptId |
language |
Force language, see list of supported languages specified in the browser | The user's preferred language |
region |
Unicode region subtag identifiers compatible with ISO 3166-1 | |
nonce |
Use a cryptographic nonce attribute | |
retries |
The number of script load retries | 3 |
url |
Custom url to load the Google Maps API script | https://maps.googleapis.com/maps/api/js |
version |
The release channels or version numbers | weekly |
libraries |
The additional libraries to load, see list of supported libraries | ['maps', 'marker'] , those two libraries are always loaded |
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: