-
-
Notifications
You must be signed in to change notification settings - Fork 315
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] Introduce ux_map.google_maps.default_map_id
configuration
#2350
Conversation
->set($rendererFactoryName = 'ux_map.renderer_factory.'.$name, $bridge['renderer_factory']) | ||
->parent('ux_map.renderer_factory.abstract') | ||
->tag('ux_map.renderer_factory'); | ||
|
||
if ('google' === $name) { | ||
$container->services() | ||
->get($rendererFactoryName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big fan of variables in service names (just personal taste here)
'map' => (clone $map), | ||
]; | ||
yield 'with default map id, when passing options (except the "mapId")' => [ | ||
'expected_renderer' => '<div data-controller="symfony--ux-google-map--map" data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"my_api_key"}" data-symfony--ux-google-map--map-view-value="{"center":{"lat":48.8566,"lng":2.3522},"zoom":12,"fitBoundsToMarkers":false,"options":{"mapId":DefaultMapId,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20}},"markers":[],"polygons":[]}"></div>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'expected_renderer' => '<div data-controller="symfony--ux-google-map--map" data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"my_api_key"}" data-symfony--ux-google-map--map-view-value="{"center":{"lat":48.8566,"lng":2.3522},"zoom":12,"fitBoundsToMarkers":false,"options":{"mapId":DefaultMapId,"gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20}},"markers":[],"polygons":[]}"></div>', | |
'expected_renderer' => '<div data-controller="symfony--ux-google-map--map" data-symfony--ux-google-map--map-provider-options-value="{"apiKey":"my_api_key"}" data-symfony--ux-google-map--map-view-value="{"center":{"lat":48.8566,"lng":2.3522},"zoom":12,"fitBoundsToMarkers":false,"options":{"mapId":"DefaultMapId","gestureHandling":"auto","backgroundColor":null,"disableDoubleClickZoom":false,"zoomControlOptions":{"position":22},"mapTypeControlOptions":{"mapTypeIds":[],"position":14,"style":0},"streetViewControlOptions":{"position":22},"fullscreenControlOptions":{"position":20}},"markers":[],"polygons":[]}"></div>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be the cause of the failing checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes IK, I didn't have time to continue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to help 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But yeah that's was it! This issue was different from the local issue because the Google bridge had dependency on UX Map from packagist (without the tapOptions
thing). A symbolic link and applying your patch fixed the issue.
….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
With this modification, I can configure a default Google Maps
mapId
:without having to manually pass the
mapId
when creating aMap
: