1
votes

I have created a google map and am linking to a kml layer (shown below) in order to create the placemarks. I am trying to do two things:

  1. Get the name of each placemark and write it out in a div on the page.
  2. link the hover states of the placemark on the map and the respective name in the div, so that when either is hovered over, both have a hover state.

layers = new google.maps.KmlLayer('url of kml file is here', { preserveViewport: true });

1

1 Answers

1
votes

Can't do either with KmlLayer. Look at using a third party KML parser like geoxml3 or geoxml-v3; or importing your KML into a FusionTable and using a FusionTablesLayer and querying the table for the sidebar and hover information.

example using geoxml3