Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here is my code. </p> <pre><code>`&lt;script type="text/javascript"&gt; var geocoder = null; var arr = new Array(); var arr1 = new Array(); var arr2 = new Array(); var map = null; var chr; var baseIcon = null; function initialize() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng('&lt;%=Request["Lat"]%&gt;', '&lt;%=Request["Long"]%&gt;'), 13); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); // Create a base icon for all of our markers that specifies the // shadow, icon dimensions, etc. baseIcon = new GIcon(); // baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize = new GSize(25, 30); baseIcon.shadowSize = new GSize(37, 34); baseIcon.iconAnchor = new GPoint(9, 34); baseIcon.infoWindowAnchor = new GPoint(9, 2); baseIcon.infoShadowAnchor = new GPoint(18, 25); // Creates a marker whose info window displays the letter corresponding to the given index. function createMarker(point, index) { // Create a lettered icon for this point using our icon class var letter = String.fromCharCode("A".charCodeAt(0) + index); var letteredIcon = new GIcon(baseIcon); letteredIcon.image = "markers/marker" + index + ".png"; // Set up our GMarkerOptions object markerOptions = { icon: letteredIcon }; var marker = new GMarker(point, markerOptions); GEvent.addListener(marker, "click", function () { marker.openInfoWindowHtml("&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;img src=markers/marker" + index + ".png length=25 width=25 /&gt;&lt;/td&gt;" + "&lt;td&gt;" + arr2[index] + "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"); }); return marker; } for (var i = 0; i &lt; arr.length; i++) { var latlng = new GLatLng(arr[i], arr1[i]); map.addOverlay(createMarker(latlng, i)); } } } </code></pre> <p>` </p>
 

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