Line | |
---|
1 | var map;
|
---|
2 | var geoXml;
|
---|
3 | var toggleState = 1;
|
---|
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 | }
|
---|
24 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.