Skip to content

Commit 33ae8f2

Browse files
committed
minor #2358 [Map][Google] Add documentation about ux_map.google_maps.default_map_id (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- [Map][Google] Add documentation about `ux_map.google_maps.default_map_id` | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> I've just tilted that I've missed to document the new feature introduced in #2350 for #2306 Commits ------- 18d7b6b [Map][Google] Add documentation about ux_map.google_maps.default_map_id
2 parents 222973e + 18d7b6b commit 33ae8f2

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)