I am using Google Maps JavaScript API v3. I want to wire up to the Google Maps, KmlLayer
's KmlMouseEvent
for all of the default places that show up when I create the map.
The only way I have found that gives me a reference to the KmlLayer is to create it. However, I want all the default data.
This post explains how to wire up to the KmlMouseEvent
click if I am loading the KML from an external file. However, I can't find any documentation in the API that allows me to access the click event of the default KmlLayer.
The best solution I've been able to come up with is to make a call to the Places API and generate a KML file from the returned data. There's just got to be a better way.