Changeset 7694 for trunk


Ignore:
Timestamp:
Apr 7, 2010, 4:23:02 PM (15 years ago)
Author:
janveeden
Message:
 
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   }
     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
  • trunk/src_map/index.php

    r7688 r7694  
    99
    1010<!-- 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&amp;v=2&amp;key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA" type="text/javascript"></script>
    1212<!-- Loading in the javascript that will add the map into #mapcanvas -->
    1313<script type="text/javascript" src="inc/nodemapWL.js"></script>
     
    6969                                <!-- First colum -->
    7070                                <td>
    71                                         <input type="checkbox" value="shownodes">Toon nodes
     71                                        <input type="checkbox" value="shownodes" onchange="toggleMyKml();" CHECKED>Toon nodes
    7272                                </td>   
    7373                                <!-- Second colum -->
Note: See TracChangeset for help on using the changeset viewer.