Changeset 7756 for trunk/src/map/inc
- Timestamp:
- Apr 14, 2010, 10:02:45 AM (15 years ago)
- Location:
- trunk/src/map/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/map/inc/node_info.php
r7738 r7756 1 1 2 <?php 2 3 if(isset($_GET['view'])) … … 13 14 else 14 15 $view = "gebruiker"; 16 } 17 18 if(isset($_GET['sel'])) 19 { 20 $selected = $_GET['sel']; 21 } 22 else 23 { 24 $selected = ""; 15 25 } 16 26 … … 87 97 <h2> 88 98 Lijst met nodes in deze cluster<br/> 89 <div id="clusterlist ">99 <div id="clusterlist$selected"> 90 100 <select multiple> 91 101 EOF; … … 106 116 EOF; 107 117 } 118 ?> -
trunk/src/map/inc/nodemapWL.js
r7738 r7756 6 6 var xmlhttp; 7 7 var targetDiv = "infotop"; 8 var selected; 9 var overNode; 8 10 9 11 //This function is called from index.php … … 24 26 } 25 27 28 GEvent.addListener(map, "click", function() { 29 if(!overNode == true) 30 deSelect(); 31 }); 32 26 33 var markerClusterer = new MarkerClusterer(map, markerArray); 27 34 } … … 39 46 //Added mouseover listener that calls on our mouseOver function when the mouse moves over a marker on the map 40 47 GEvent.addListener(marker, 'mouseover', function() { 41 mouseOver(current.id, current.name[0]); 42 }); 48 mouseOverNode(current.id, current.name[0]); 49 }); 50 GEvent.addListener(marker, 'click', function() { 51 mouseClickNode(current.id, current.name[0]); 52 }); 53 GEvent.addListener(marker, 'mouseout', function() { 54 mouseOutNode(current.id, current.name[0]); 55 }); 56 43 57 markerArray[i] = marker; 44 58 return marker; 45 59 } 46 60 61 47 62 //Our mouseover function for single nodes. Gives the ID(our own given ID) and the name of the node. 48 function mouseOver(id, name) 49 { 50 //this.obj = document.getElementById("infotop"); 51 loadXMLDoc("inc/node_info.php?type=single") 52 //We will replace this function with a httprequest to a php file in the future 53 54 63 function mouseClickNode(id, name) 64 { 65 selected = true; 66 loadXMLDoc("inc/node_info.php?type=single"); 55 67 /* 56 68 *Hieronder verdergaan met dekking 57 69 */ 70 71 } 72 //Our mouseover function for single nodes. Gives the ID(our own given ID) and the name of the node. 73 function mouseOverNode(id, name) 74 { 75 if(!selected == true) 76 { 77 overNode = true; 78 loadXMLDoc("inc/node_info.php?type=single"); 79 /* 80 *Hieronder verdergaan met dekking 81 */ 82 83 } 84 } 85 86 function mouseOutNode(id, name) 87 { 88 overNode = false; 58 89 } 59 90 … … 61 92 function mouseOverCluster(markers) 62 93 { 94 if(!selected == true) 95 { 96 //Make 'markers' array (containing gmarkers) into an array containing only the titles(names) of the markers 97 var markerTitles = new Array; 98 for(var i=0; i<markers.length; i++) { 99 markerTitles.push(markers[i].marker.getTitle()); 100 } 101 102 var markerTitleSerialized; 103 104 //start 105 var a_php = ""; 106 var total = 0; 107 108 for (var i=0; i<markerTitles.length; i++) 109 { 110 ++ total; 111 a_php = a_php + "s:" + 112 String(i).length + ":\"" + String(i) + "\";s:" + 113 String(markerTitles[i]).length + ":\"" + String(markerTitles[i]) + "\";"; 114 } 115 a_php = "a:" + total + ":{" + a_php + "}"; 116 //end 117 118 loadXMLDoc("inc/node_info.php?type=cluster&markers="+a_php+"") 119 /* 120 *Hieronder verdergaan met dekking 121 */ 122 } 123 } 124 125 //Our click function for Cluster nodes. 'markers' is an array containing all markers within the cluster 126 function clickCluster(markers) 127 { 128 //Let the rest of the program know that something is selected 129 select(); 130 63 131 //Make 'markers' array (containing gmarkers) into an array containing only the titles(names) of the markers 64 132 var markerTitles = new Array; … … 83 151 //end 84 152 85 loadXMLDoc("inc/node_info.php?type=cluster&markers="+a_php+"") 86 /* 87 *Hieronder verdergaan met dekking 88 */ 89 } 90 91 //Our click function for Cluster nodes. 'markers' is an array containing all markers within the cluster 92 function clickCluster(markers) 93 { 94 95 } 96 153 loadXMLDoc("inc/node_info.php?type=cluster&markers="+a_php+"&sel=selected") 154 } 155 156 function select() 157 { 158 selected = true; 159 } 160 161 function deSelect() 162 { 163 selected = false; 164 loadXMLDoc("inc/node_info.php"); 165 } 97 166 98 167 //Code from w3schools. http://www.w3schools.com/dom/dom_http.asp
Note:
See TracChangeset
for help on using the changeset viewer.