1 /* this function should solve the issue of calling a function
2 * upon page load, that badly depends on the browser
3 * see an example in http://svn.planet-lab.org/wiki/GooglemapSetup
15 s="<scr".concat("ipt defer src='//:' on",r,"change='if(this.",r,"==\"complete\"){this.parentNode.removeChild(this);",c,".",c,"()}'></scr","ipt>");
16 a[c]=(function(o){return function(){a[c]=function(){};for(a=arguments.callee;!a.done;a.done=1)f(o?o():o)}})(a[c]);
17 if(d[e])d[e]("DOMContentLoaded",a[c],false);
18 if(/WebKit|Khtml/i.test(b)||(w[o]&&parseInt(w[o].version())<9))(function(){/loaded|complete/.test(d[r])?a[c]():setTimeout(arguments.callee,1)})();
19 else if(/MSIE/i.test(b))d.write(s);
22 function googlemap (htmlid,kmlurl,centerLat, centerLon, zoom) {
23 // alert ('in googlemap, kmlurl='+kmlurl+',id ='+htmlid);
24 if (GBrowserIsCompatible()) {
25 var map = new GMap2(document.getElementById(htmlid));
26 map.setCenter(new GLatLng(centerLat, centerLon), zoom);
27 map.addControl(new GLargeMapControl());
28 map.addControl(new GMapTypeControl());
29 map.addControl(new GOverviewMapControl());
30 /*var geocoder = new GClientGeocoder();*/
31 map.setMapType(G_SATELLITE_MAP);
33 geoXml = new GGeoXml(kmlurl);
34 map.addOverlay(geoXml);
38 window.onunload=GUnload;