Skip to content

Commit

Permalink
minor #2358 [Map][Google] Add documentation about `ux_map.google_maps…
Browse files Browse the repository at this point in the history
….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
  • Loading branch information
Kocal committed Nov 10, 2024
2 parents 222973e + 18d7b6b commit 33ae8f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
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

0 comments on commit 33ae8f2

Please sign in to comment.