From GamingWiki
Jump to: navigation, search
Line 81: Line 81:
 
  */
 
  */
 
function addZone(lat, lng, corners, title, id) {
 
function addZone(lat, lng, corners, title, id) {
var descId = 'desc'+id;
+
//var descId = 'desc'+id;
 
// Draw zone
 
// Draw zone
 
var zone = new google.maps.Polygon({
 
var zone = new google.maps.Polygon({
Line 90: Line 90:
 
fillColor:    "#FF0000",
 
fillColor:    "#FF0000",
 
fillOpacity:  0.35,
 
fillOpacity:  0.35,
title:         title
+
map:           map
 
});
 
});
zone.setMap(map);
+
//zone.setMap(map);
 
//var marker = new google.maps.Marker({position:latlng, map: map, title:title});
 
//var marker = new google.maps.Marker({position:latlng, map: map, title:title});
google.maps.event.addListener(zone, "click", function() {  
+
//google.maps.event.addListener(zone, "click", function() {  
infowindow.setContent(document.getElementById(descId).innerHTML);
+
// infowindow.setContent(document.getElementById(descId).innerHTML);
infowindow.open(map,zone);  
+
// infowindow.open(map,zone);  
});
+
// });
GMarkers[id] = zone;
+
//GMarkers[id] = zone;
 
// Also add a marker?
 
// Also add a marker?
//addMarkerByLatLng(lat,lng,title,id);
+
addMarkerByLatLng(lat,lng,title,id);
 
}
 
}
  

Revision as of 20:56, 16 May 2011