Note that there are some explanatory texts on larger screens.

plurals
  1. POInfowindow for circular marker in Google Map
    primarykey
    data
    text
    <p>Problem :I am trying to get a info Window on click of circular marker in Google Map .</p> <p>My Code : </p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no"&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Google Maps JavaScript API v3 Example: Circle Simple&lt;/title&gt; &lt;style type="text/css"&gt; #map_canvas { height: 100% } &lt;/style&gt; &lt;script src="https://maps.googleapis.com/maps/api/js?&amp;sensor=false" type="text/javascript"&gt; &lt;/script&gt; &lt;script type="text/javascript"&gt; var citymap = {}; citymap['Yelahanka'] = { center: new google.maps.LatLng(13.133754,77.585784), population: 2842518 }; citymap['Dodaballarpur'] = { center: new google.maps.LatLng(15.133754,77.585784), population: 8143197 }; citymap['Mekricircle'] = { center: new google.maps.LatLng(16.133754,77.585784), population: 3844829 } var cityCircle; function initialize() { var mapOptions = { zoom: 7, center: new google.maps.LatLng(13.133754,77.585784), mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); var contentString = '&lt;div id="content"&gt;'+ '&lt;div id="siteNotice"&gt;'+ '&lt;/div&gt;'+ '&lt;h1 id="firstHeading" class="firstHeading"&gt;Uluru&lt;/h1&gt;'+ '&lt;div id="bodyContent"&gt;'+ '&lt;p&gt;&lt;b&gt;Uluru&lt;/b&gt;, also referred to as &lt;b&gt;Ayers Rock&lt;/b&gt;, is a large ' + 'sandstone rock formation in the southern part of the '+ 'Northern Territory, central Australia. It lies 335&amp;#160;km (208&amp;#160;mi) '+ 'south west of the nearest large town, Alice Springs; 450&amp;#160;km '+ '(280&amp;#160;mi) by road. Kata Tjuta and Uluru are the two major '+ 'features of the Uluru - Kata Tjuta National Park. Uluru is '+ 'sacred to the Pitjantjatjara and Yankunytjatjara, the '+ 'Aboriginal people of the area. It has many springs, waterholes, '+ 'rock caves and ancient paintings. Uluru is listed as a World '+ 'Heritage Site.&lt;/p&gt;'+ '&lt;p&gt;Attribution: Uluru, &lt;a href="http://en.wikipedia.org/w/index.php?title=Uluru&amp;oldid=297882194"&gt;'+ 'http://en.wikipedia.org/w/index.php?title=Uluru&lt;/a&gt; '+ '(last visited June 22, 2009).&lt;/p&gt;'+ '&lt;/div&gt;'+ '&lt;/div&gt;'; var infowindow = new google.maps.InfoWindow({ content: contentString }); for (var city in citymap) { var populationOptions = { strokeColor: '#FF0000', strokeOpacity: 0.8, strokeWeight: 6, fillColor: '#669999', fillOpacity: 0.45, map: map, center: citymap[city].center, radius: citymap[city].population / 200 }; cityCircle = new google.maps.Circle(populationOptions); } google.maps.event.addListener(populationOptions,'click', function() { alert("i am here in this infowindow"); infowindow.open(map,populationOptions ); }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="map_canvas"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>When i click on the circular marker it doesnot respond and I dont get any infowindow. In the above code i am trying to create a dynamic circle around place with infowindow showing some details on click of the circular region.</p>
    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.
    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