a gmap-api v3 compatible replacement for the googlemap
[plewww.git] / googlemap / googlemap.js
index 7925343..f0b89d1 100644 (file)
@@ -19,6 +19,20 @@ function onContent(f){
   else if(/MSIE/i.test(b))d.write(s);
 }
 
+/* the PLE snippet for embedding a googlemap in front page */
+/*
+<p><?php
+drupal_set_html_head('<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<..>"
+      type="text/javascript"></script>');
+drupal_add_js('googlemap/googlemap.js',TRUE);
+drupal_set_html_head('<script type="text/javascript">
+function my_googlemap () { ts = new Date().getTime(); googlemap("map_area","http://www.planet-lab.eu/sites/sites.kml?" + ts,52,15,4);} 
+onContent(my_googlemap);
+</script>');
+?>
+<div id="map_area" style="width: 640px; height: 480px">  </div></p>
+*/
+
 function googlemap (htmlid,kmlurl,centerLat, centerLon, zoom) {
   //  alert ('in googlemap, kmlurl='+kmlurl+',id ='+htmlid);
   if (GBrowserIsCompatible()) {