- Timestamp:
- Apr 7, 2010, 4:23:02 PM (15 years ago)
- Location:
- trunk/src_map
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src_map/inc/nodemapWL.js
r7671 r7694 1 function initialize_map() { 2 //Specify start position of the map 3 var latlng = new google.maps.LatLng(52.162687, 4.493294); 4 //Default settings for how the map starts out 5 var myOptions = { 6 zoom: 11, 7 center: latlng, 8 mapTypeId: google.maps.MapTypeId.ROADMAP 9 }; 10 //Create the map using the settings from myOptions and placing it in the div mapcanvas 11 var map = new google.maps.Map(document.getElementById("mapcanvas"), myOptions); 12 } 1 var map; 2 var geoXml; 3 var toggleState = 1; 13 4 5 function initialize_map() { 6 if (GBrowserIsCompatible()) { 7 geoXml = new GGeoXml("http://www.mantixweb.nl/nodemap/example.kml?tijd=10342"); 8 map = new GMap2(document.getElementById("mapcanvas")); 9 map.setCenter(new GLatLng(52.162687, 4.493294), 11); 10 map.setUIToDefault(); 11 map.addOverlay(geoXml); 12 } 13 } 14 15 function toggleMyKml() { 16 if (toggleState == 1) { 17 map.removeOverlay(geoXml); 18 toggleState = 0; 19 } else { 20 map.addOverlay(geoXml); 21 toggleState = 1; 22 } 23 } 14 24 -
trunk/src_map/index.php
r7688 r7694 9 9 10 10 <!-- Loading in the google-api --> 11 <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>11 <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA" type="text/javascript"></script> 12 12 <!-- Loading in the javascript that will add the map into #mapcanvas --> 13 13 <script type="text/javascript" src="inc/nodemapWL.js"></script> … … 69 69 <!-- First colum --> 70 70 <td> 71 <input type="checkbox" value="shownodes" >Toon nodes71 <input type="checkbox" value="shownodes" onchange="toggleMyKml();" CHECKED>Toon nodes 72 72 </td> 73 73 <!-- Second colum -->
Note:
See TracChangeset
for help on using the changeset viewer.