- Timestamp:
- 2012-09-11T10:14:44+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js
r26141 r26160 17 17 { 18 18 modifyFunctions(); 19 20 19 setUpMap(); 21 20 … … 45 44 if(_docList.ids.length > 1) 46 45 { 46 var startStopCheckbox = document.createElement("input"); 47 startStopCheckbox.setAttribute("type", "checkbox"); 48 startStopCheckbox.setAttribute("checked", "true"); 49 startStopCheckbox.onclick = function() 50 { 51 if(startStopCheckbox.checked) 52 { 53 if(_intervalHandle == null) 54 { 55 _intervalHandle = setInterval(loopThroughMarkers, 2000); 56 } 57 } 58 else 59 { 60 clearInterval(_intervalHandle); 61 _intervalHandle = null; 62 } 63 }; 64 65 var label = document.createElement("span"); 66 label.innerHTML = "Scroll through places"; 67 68 var container = document.createElement("DIV"); 69 container.appendChild(startStopCheckbox); 70 container.appendChild(label); 71 container.setAttribute("class", "ui-widget-header ui-corner-all"); 72 container.setAttribute("style", "clear:right; float:right; padding:0px 5px 3px 0px;"); 73 74 $(container).insertAfter("#map_canvas"); 75 47 76 _intervalHandle = setInterval(loopThroughMarkers, 2000); 48 77 } … … 337 366 { 338 367 clearInterval(_intervalHandle); 368 _intervalHandle = null; 339 369 _map.panTo(new google.maps.LatLng(doc.lat, doc.lng)); 340 370 clearAllInfoBoxes(); … … 357 387 var marker 358 388 if(mainMarker) 389 { 390 marker = new google.maps.Marker 391 ({ 392 position: pos, 393 title:doc.title, 394 map:_map 395 }); 396 } 397 else 359 398 { 360 399 marker = new google.maps.Marker … … 364 403 map:_map, 365 404 icon:"interfaces/" + gs.xsltParams.interface_name + "/images/bluemarker.png" 366 });367 }368 else369 {370 marker = new google.maps.Marker371 ({372 position: pos,373 title:doc.title,374 map:_map375 405 }); 376 406 }
Note:
See TracChangeset
for help on using the changeset viewer.