2
votes

I have a Google Map that loads a layer of markers from a KML file. Each placemark has an ID (simply id="1" through id="25").

Is it possible to open a specific placemark's infowindow from a URL parameter? If so, how?

The idea is that an address on another page is linked to its corresponding placemark http://MAPURL.COM/?id=4 or something.

Here's a jsfiddle to see the whole thing in action: http://jsfiddle.net/natejones/JAyCF/3/

Thanks!

1

1 Answers

1
votes

Your customization options are really limited using a KML Overlay. As far as I know there's no way to open a KML marker's InfoWindow without going through and clicking on the marker; the InfoWindow isn't always loaded in many cases until the KmlLayer's click event is fired.

I'd suggest using native marker elements (google.maps.Marker) which would easily let you trigger an InfoWindow's open event.