Changeset 7809 for trunk/src/map/inc/nodemapWL.js
- Timestamp:
- Apr 17, 2010, 5:40:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/map/inc/nodemapWL.js
r7808 r7809 1 1 //Declaring some variables we will be using 2 2 var gmap_search_state = false; 3 3 4 var map; 4 5 var markerArray = new Array(); … … 8 9 var selected = false; 9 10 var overNode; 10 var markerSelected ;11 var markerSelected = ""; 11 12 var polygons_on_map_array = new Array(); 12 13 … … 14 15 //This function is called from index.php 15 16 function initialize_map() { 16 suggestMarkers("");17 17 //We will only do this function if the browser is compatible 18 18 if (GBrowserIsCompatible()) { … … 45 45 46 46 var markerClusterer = new MarkerClusterer(map, markerArray); 47 suggestMarkers(""); 47 48 } 48 49 } … … 136 137 //Make 'markers' array (containing gmarkers) into an array containing only the titles(names) of the markers 137 138 var markerTitles = new Array; 138 139 var markerLatLngs = new Array; 139 140 140 141 for(var i=0; i<markers.length; i++) { 141 142 142 143 markerTitles.push(markers[i].marker.getTitle()); 144 markerLatLngs.push(markers[i].marker.getLatLng() ); 143 145 } 144 146 … … 161 163 162 164 map.addOverlay(polygon); 163 165 polygons_on_map_array.push(polygon); 164 166 } 165 167 … … 198 200 //Make 'markers' array (containing gmarkers) into an array containing only the titles(names) of the markers 199 201 var markerTitles = new Array; 200 var markerLatLngs = new Array;201 202 202 for(var i=0; i<markers.length; i++) { 203 markerTitles.push(markers[i].marker.getTitle()); 204 markerLatLngs.push(markers[i].marker.getLatLng() ); 205 } 206 207 208 209 210 var polygons_on_map_array = new Array; 211 for (var i=0; i<markerLatLngs.length; i++) 212 { 213 latLng = String(markerLatLngs[i]); 214 215 pos = latLng.indexOf(','); 216 pos2 = latLng.length-1; 217 218 var latitude = Number(latLng.substring(1, pos) ); 219 var longitude = Number(latLng.substring(2 + pos, pos2) ); 220 221 222 polygons_on_map_array.push( drawCircle( latitude, longitude,2.0, "#6C3", 1, 0.75, "#0F0",.2) ); 223 224 225 226 map.addOverlay(polygons_on_map_array[i]); 203 markerTitles.push(markers[i].marker.getTitle()); 227 204 228 205 } … … 250 227 { 251 228 252 253 deSelect();254 255 256 229 //TODO DELETE ALL CIRCLES 257 230 … … 274 247 function deSelect() 275 248 { 276 277 map.removeOverlay(polygon); 249 selected = false; 250 251 loadXMLDoc("inc/node_info.php"); 252 if(!markerSelected == "") 253 markerSelected.setImage("../img/sleutelGroen.png"); 254 278 255 for(var i=0; i<polygons_on_map_array.length; i++) 279 256 { 280 281 257 var currentpolygon = polygons_on_map_array[i]; 282 map.removeOverlay(polygon); 283 } 284 285 286 selected = false; 287 loadXMLDoc("inc/node_info.php"); 288 markerSelected.setImage("../img/sleutelGroen.png"); 289 290 258 map.removeOverlay(currentpolygon); 259 } 291 260 292 261 } … … 379 348 } 380 349 381 function toggleGoogleSearchMap()382 {383 if(gmap_search_state)384 {385 gmap_search_state = false;386 }387 else388 {389 gmap_search_state = true;390 }391 392 if(gmap_search_state)393 {394 map.enableGoogleBar();395 }396 397 if(!gmap_search_state)398 {399 map.disableGoogleBar();400 }401 }402 403 350 function suggestMarkers(value) 404 351 { … … 408 355 409 356 410 411
Note:
See TracChangeset
for help on using the changeset viewer.