Changeset 7694 for trunk/src_map/inc


Ignore:
Timestamp:
Apr 7, 2010, 4:23:02 PM (15 years ago)
Author:
janveeden
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified 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   }
     1var map;
     2var geoXml;
     3var toggleState = 1;
    134
     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        }
    1424
Note: See TracChangeset for help on using the changeset viewer.