Changeset 7786 for trunk/src/map/inc
- Timestamp:
- Apr 16, 2010, 1:42:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/map/inc/nodemapWL.js
r7783 r7786 6 6 var xmlhttp; 7 7 var targetDiv = "infotop"; 8 var selected ;8 var selected = false; 9 9 var overNode; 10 var markerSelected; 10 11 11 12 … … 28 29 29 30 GEvent.addListener(map, "click", function() { 30 31 32 33 31 if(!overNode == true) 34 32 deSelect(); … … 58 56 }); 59 57 GEvent.addListener(marker, 'click', function() { 60 mouseClickNode(current.id, current.name[0] );58 mouseClickNode(current.id, current.name[0], marker); 61 59 }); 62 60 GEvent.addListener(marker, 'mouseout', function() { … … 64 62 }); 65 63 66 markerArray [i] = marker;64 markerArray.push(marker); 67 65 return marker; 68 66 } 69 67 70 71 68 //Our mouseover function for single nodes. Gives the ID(our own given ID) and the name of the node. 72 function mouseClickNode(id, name) 73 { 74 selected = true; 75 76 map.removeOverlay(polygon); 77 /* 78 *Hieronder verdergaan met dekking 79 */ 80 81 82 83 69 function mouseClickNode(id, name, marker) 70 { 71 if(selected == true) 72 deSelect(); 73 74 if(markerSelected == marker) 75 { 76 deSelect(); 77 markerSelected = ""; 78 } 79 else 80 { 81 selected = true; 82 83 markerSelected = marker; 84 marker.setImage("../img/sleutelGroenSelected.png"); 85 loadXMLDoc("inc/node_info.php?type=single&name="+name+""); 86 87 /* 88 *Hieronder verdergaan met dekking 89 */ 90 91 map.removeOverlay(polygon); 92 } 84 93 } 85 94 //Our mouseover function for single nodes. Gives the ID(our own given ID) and the name of the node. 86 95 function mouseOverNode(id, name, lat, longitude) 87 96 { 97 overNode = true; 88 98 if(!selected == true) 89 99 { 90 overNode = true;91 100 loadXMLDoc("inc/node_info.php?type=single&name="+name+""); 92 101 … … 180 189 selected = false; 181 190 loadXMLDoc("inc/node_info.php"); 191 markerSelected.setImage("../img/sleutelGroen.png"); 192 193 } 194 195 function removeOtherSelect() 196 { 197 for(var i=0; i<markerArray.length; i++) 198 { 199 currentmarker = markerArray[i]; 200 currentmarker.setImage("../sleutelGroen.png"); 201 } 202 return true; 182 203 } 183 204
Note:
See TracChangeset
for help on using the changeset viewer.