How to get a link to a Google Map object from a container identifier?

Can I get a link to the google.maps.Map object for this DOM element?

+7
source share
1 answer

No, it is not possible to get a map already created with a DOM element.

I usually work in one of two ways, creating a global map variable or passing a map variable around functions as needed. If you work with multiple maps on a page, you can probably create your own map registry that handles simple DOM id → map search queries.

+8
source

All Articles