Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Map][Google] Add documentation about ux_map.google_maps.default_map_id #2358

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Map/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ Configuration is done in your ``config/packages/ux_map.yaml`` file:
# config/packages/ux_map.yaml
ux_map:
renderer: '%env(resolve:default::UX_MAP_DSN)%'

# Google Maps specific configuration
google_maps:
# Configure the default Map Id (https://developers.google.com/maps/documentation/get-map-id),
# without to manually configure it in each map instance (through "new GoogleOptions(mapId: 'your_map_id')").
default_map_id: null

The ``UX_MAP_DSN`` environment variable configure which renderer to use.

Expand Down
7 changes: 5 additions & 2 deletions src/Map/src/Bridge/Google/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ $map = (new Map())
->center(new Point(48.8566, 2.3522))
->zoom(6);

// To configure controls options, and some other options:
// To configure control options and other map options:
$googleOptions = (new GoogleOptions())
->mapId('YOUR_MAP_ID')
// You can skip this option if you configure "ux_map.google_maps.default_map_id"
// in your "config/packages/ux_map.yaml".
->mapId('YOUR_MAP_ID')

->gestureHandling(GestureHandling::GREEDY)
->backgroundColor('#f00')
->doubleClickZoom(true)
Expand Down