Changeset 7732 for trunk/src/map
- Timestamp:
- Apr 13, 2010, 12:16:45 PM (15 years ago)
- Location:
- trunk/src/map/inc
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/map/inc/nodemapWL.js
r7722 r7732 3 3 var toggleState = 1; 4 4 var marker_hash = {}; 5 var markerArray = new Array(); 5 6 6 7 //This function is called from index.php … … 17 18 for (var i=0; i<markers.length; i++) { 18 19 var current = markers[i]; 19 var marker = addMarker(current );20 var marker = addMarker(current, i); 20 21 marker_hash[current.id] = {marker : marker}; 21 22 } 23 24 var markerClusterer = new MarkerClusterer(map, markerArray); 22 25 } 23 26 } 24 27 25 28 //This function will contain the displaying and not displaying of nodes on the map 26 function toggleNodes() { 27 if (toggleState == 1) { 28 map.removeOverlay(geoXml); 29 toggleState = 0; 30 } else { 31 map.addOverlay(geoXml); 32 toggleState = 1; 33 } 29 function toggleMyKml() { 30 34 31 } 35 32 36 33 //This function adds a marker with an object from our 'marker'array defined in index.php 37 function addMarker(current ) {34 function addMarker(current, i) { 38 35 var marker = new GMarker(new GLatLng(current.latitude[0], current.longitude[0])); 39 map.addOverlay(marker);40 36 //Added mouseover listener that calls on our mouseOver function when the mouse moves over a marker on the map 41 37 GEvent.addListener(marker, 'mouseover', function() { 42 38 mouseOver(current.id, current.name[0]); 43 39 }); 40 markerArray[i] = marker; 44 41 return marker; 45 42 }
Note:
See TracChangeset
for help on using the changeset viewer.