question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `mapId` map init option to `agm-map` directive

See original GitHub issue

Not all google.maps.Map options are included in the <agm-map> directive, it is missing a very important feature which is the mapId and this is different than the mapTypeId, it allows us to use the Google Maps API styling and Vector maps for the recently introduced WebGL features:

This is very important for our project and we would very much appreciate the inclusion of mapId in the <agm-map> component, because mapId can only be set for the map options when initializing google.maps.Map(element, options) as the setOptions({ mapId: "..."}) has no effect later as the documentation mentions,

Thank you.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:11

github_iconTop GitHub Comments

2reactions
julienM77commented, Apr 22, 2022

If it helps, I ended up migrating my project to angular 13 and using the “official” google map component, my transition didn’t require much modification https://github.com/angular/components/tree/master/src/google-maps#readme

2reactions
stale[bot]commented, Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add mapId map init option to agm-map directive #1960 - GitHub
Map options are included in the directive, it is missing a very important feature which is the mapId and this is different than...
Read more >
AgmMap - @agm/core
AgmMap renders a Google Map. ... Defined in packages/core/src/lib/directives/map.ts:413 ... This option can only be set when the map is initialized.
Read more >
angular agm-map how to let user drop marker - Stack Overflow
I want users to be able to add a marker on the map. ... In agm-map I tried to find something similar and...
Read more >
Map ID with Styling | Maps JavaScript API - Google Developers
function initMap(): void { new google.maps.Map( document.getElementById("map") as HTMLElement, { mapId: "8e0a97af9386fef", center: { lat: 48.85, lng: 2.35 } ...
Read more >
angular2-google-maps - Bountysource
Add mapId to the agm-map directive $ 0 ... Created 1 year ago in SebastianM/angular-google-maps with 0 comments. Not all google.maps.Map options are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found