Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to fetch KML placement marker value in Google Maps API?
    primarykey
    data
    text
    <p>Dear all i am a newbie to Google Maps API. I have a parsed a KML layer in Google Maps API using GeoXML3. Now how do i fetch placement marker value(Name of the place) of KML in Google Maps API <strong>onclick</strong>. Like when a kml layer gets loaded on google maps and i am clicking on any marker <strong><em>i should be able to fetch the placement value of the marker in an alert box</em></strong>. Please find the code that helps me parse a kml on google maps api. Please guide.</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no" /&gt; &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"/&gt; &lt;title&gt;KML Layer&lt;/title&gt; &lt;link href="/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" /&gt; &lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://geoxml3.googlecode.com/svn/branches/polys/geoxml3.js"&gt;&lt;/script&gt; &lt;style type="text/css"&gt; html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } &lt;/style&gt; &lt;script type="text/javascript"&gt; function initialize() { var chicago = new google.maps.LatLng(75.602836700999987,32.261890444473394); var myOptions = { zoom: 2, center: chicago, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); //var transitLayer = new google.maps.TransitLayer(); //transitLayer.setMap(map); var geoXml = new geoXML3.parser({map: map, singleInfoWindow: true}); geoXml.parse('kmload.kml'); var geoXml1 = new geoXML3.parser({map: map, singleInfoWindow: true}); geoXml1.parse('lines.kml'); } &lt;/script&gt; &lt;/head&gt; &lt;body onload="initialize()"&gt; &lt;div id="map_canvas"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload