- Timestamp:
- Apr 18, 2010, 5:04:00 PM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 7 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/map/inc/iconStyles.js
r7786 r7830 1 1 var greenIcon = new GIcon(); 2 var redIcon = new GIcon(); 2 3 3 4 greenIcon.image = '../img/greenMarker/image.png'; … … 11 12 greenIcon.printShadow = '../img/greenMarker/printShadow.gif'; 12 13 greenIcon.transparent = '../img/greenMarker/transparent.png'; 14 15 redIcon.image = '../img/redMarker/image.png'; 16 redIcon.shadow = '../img/redMarker/shadow.png'; 17 redIcon.iconSize = new GSize(32,41); 18 redIcon.shadowSize = new GSize(53,41); 19 redIcon.iconAnchor = new GPoint(16,41); 20 redIcon.infoWindowAnchor = new GPoint(16,25); 21 redIcon.printImage = '../img/redMarker/printImage.gif'; 22 redIcon.mozPrintImage = '../img/redMarker/mozPrintImage.gif'; 23 redIcon.printShadow = '../img/redMarker/printShadow.gif'; 24 redIcon.transparent = '../img/redMarker/transparent.png'; -
trunk/src/map/inc/nodemapWL.js
r7827 r7830 17 17 function initialize_map() { 18 18 //We will only do this function if the browser is compatible 19 if (GBrowserIsCompatible()) { 19 if (GBrowserIsCompatible()) 20 { 20 21 //Adding the google map into the div called #mapcanvas 21 22 map = new GMap2(document.getElementById("mapcanvas"), {googleBarOptions : {style : "new"}}); … … 30 31 * If the latLng of the marker is both 0 31 32 */ 32 for (var i=0; i<markers.length; i++) {33 var current = markers[i];34 if(current.latitude[0] > 0 || current.latitude[0] < 0)35 {36 addMarker(current, i);37 }38 }39 40 GEvent.addListener(map, "click", function() {41 if(!overNode == true)42 deSelect();43 });44 45 GEvent.addListener(map, "zoomend", function() {46 mapZoomed();47 });48 49 suggestMarkers("");50 var markerClusterer = new MarkerClusterer(map, markerArray);51 52 33 for (var i=0; i<markers.length; i++) { 34 var current = markers[i]; 35 if(current.latitude[0] > 0 || current.latitude[0] < 0) 36 { 37 addMarker(current, i); 38 } 39 } 40 41 GEvent.addListener(map, "click", function() { 42 if(!overNode == true) 43 deSelect(); 44 }); 45 46 GEvent.addListener(map, "zoomend", function() { 47 mapZoomed(); 48 }); 49 50 suggestMarkers(""); 51 52 new MarkerClusterer(map, markerArray); 53 } 53 54 } 54 55 … … 62 63 var latitude = Number(current.latitude[0]); 63 64 var longitude = Number(current.longitude[0]); 64 //var circle = drawCircle(latitude, longitude, 2.0, "#6C3", 1, 0.75, "#0F0",.2); 65 var marker = new GMarker(new GLatLng(current.latitude[0], current.longitude[0]), {title: current.name[0], icon: greenIcon}); 65 66 var displayIcon; 67 var currentstatus = current.status[0]; 68 if(currentstatus == "up") 69 { 70 displayIcon = greenIcon; 71 } 72 else 73 { 74 displayIcon = redIcon; 75 } 76 77 var marker = new GMarker(new GLatLng(current.latitude[0], current.longitude[0]), {title: current.name[0], icon: displayIcon}); 66 78 67 79 //Added mouseover listener that calls on our mouseOver function when the mouse moves over a marker on the map … … 99 111 selected = true; 100 112 markerSelected = marker; 101 marker.setImage("../img/sleutelGroenSelected.png");//Path should be in config 102 loadXMLDoc("inc/node_info.php?type=single&name="+name+"&a="+Math.random()); //Should also be in config 113 for(var i=0; i<markers.length; i++) 114 { 115 var currentmarker = markers[i]; 116 if(currentmarker.name[0] == marker.getTitle()) 117 { 118 if(currentmarker.status[0] == "up") 119 { 120 marker.setImage("../img/sleutelGroenSelected.png"); 121 } 122 else 123 { 124 marker.setImage("../img/sleutelRoodSelected.png"); 125 } 126 127 } 128 } 129 loadXMLDoc("inc/node_info.php?type=single&name="+name+"&a="+Math.random()); 103 130 } 104 131 } … … 259 286 if(!markerSelected == "") 260 287 { 261 markerSelected.setImage("../img/sleutelGroen.png"); 288 for(var i=0; i<markers.length; i++) 289 { 290 var currentmarker = markers[i]; 291 if(currentmarker.name[0] == markerSelected.getTitle()) 292 { 293 if(currentmarker.status[0] == "up") 294 { 295 markerSelected.setImage("../img/sleutelGroen.png"); 296 } 297 else 298 { 299 markerSelected.setImage("../img/sleutelRood.png"); 300 } 301 302 } 303 } 262 304 markerSelected = ""; 263 305 }
Note:
See TracChangeset
for help on using the changeset viewer.