Skip to content

Commit 18d7b6b

Browse files
committed
[Map][Google] Add documentation about ux_map.google_maps.default_map_id
1 parent e74c44e commit 18d7b6b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Map/doc/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ Configuration is done in your ``config/packages/ux_map.yaml`` file:
3434
# config/packages/ux_map.yaml
3535
ux_map:
3636
renderer: '%env(resolve:default::UX_MAP_DSN)%'
37+
38+
# Google Maps specific configuration
39+
google_maps:
40+
# Configure the default Map Id (https://developers.google.com/maps/documentation/get-map-id),
41+
# without to manually configure it in each map instance (through "new GoogleOptions(mapId: 'your_map_id')").
42+
default_map_id: null
3743
3844
The ``UX_MAP_DSN`` environment variable configure which renderer to use.
3945

src/Map/src/Bridge/Google/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ $map = (new Map())
4646
->center(new Point(48.8566, 2.3522))
4747
->zoom(6);
4848

49-
// To configure controls options, and some other options:
49+
// To configure control options and other map options:
5050
$googleOptions = (new GoogleOptions())
51-
->mapId('YOUR_MAP_ID')
51+
// You can skip this option if you configure "ux_map.google_maps.default_map_id"
52+
// in your "config/packages/ux_map.yaml".
53+
->mapId('YOUR_MAP_ID')
54+
5255
->gestureHandling(GestureHandling::GREEDY)
5356
->backgroundColor('#f00')
5457
->doubleClickZoom(true)

0 commit comments

Comments
 (0)