开发者

Externalising Google Maps InfoWindow Content When Marker Is Selected

开发者 https://www.devze.com 2022-12-10 00:57 出处:网络
I\'m wondering if anyone knows whether it is possible to take the content of a Google Maps InfoWindow and place it in an external DIV when the marker on the map is clicked?

I'm wondering if anyone knows whether it is possible to take the content of a Google Maps InfoWindow and place it in an external DIV when the marker on the map is clicked?

I've had a good dig around both the API docs and Google to see if I can find any examples or information relating to this but have had no luck so far. However I've not had a lot of time since I got asked about this one so I have had to skim a bit so it could be that I've missed something but nothing seems to be jumping out at me.

Essentially I'd just like to know if this is indeed possible so that I don't waste anymore time researching something that is currently not possi开发者_StackOverflow社区ble with Google Maps. However if anyone has any code, examples, or ideas about how to go about doing this then that would be a very much appreciated!

Thanks,

Mark


It's definitely possible. Just add each marker to an array, along with whatever data you want to display. Add a listener to each marker which will access that data when the marker is clicked.

See these questions:

  • How do I link Google Maps Markers to other elements
  • How do I highlight markers on hover in Google Maps for a sortable table
0

精彩评论

暂无评论...
验证码 换一张
取 消