diff gis_gui/blocks/layer.js @ 278:4ade9b80b563 default tip

more cleanup. descriptions work better now.
author casties
date Fri, 24 Feb 2012 16:41:30 +0100
parents 52b1247140b7
children
line wrap: on
line diff
--- a/gis_gui/blocks/layer.js	Thu Feb 23 21:37:37 2012 +0100
+++ b/gis_gui/blocks/layer.js	Fri Feb 24 16:41:30 2012 +0100
@@ -169,18 +169,20 @@
             console.debug("new google map=",map," on el=",le);
 
             //geocoder = new google.maps.Geocoder();
-            var newMarker=new google.maps.KmlLayer(kmlURL,{ suppressInfoWindows: true, map: map});
+            var newMarker=new google.maps.KmlLayer(kmlURL, {suppressInfoWindows: false, map: map});
             
-            google.maps.event.addListener(newMarker, 'click', function(kmlEvent) {
+            google.maps.event.addListener(newMarker, 'status_changed', function() {
+                console.debug("layer loaded:", newMarker.status);
+            });
+
+            /* google.maps.event.addListener(newMarker, 'click', function(kmlEvent) {
             	var text = kmlEvent.featureData.description;
-                showInContentWindow(text);
-              });
-
-            function showInContentWindow(text) {
-            	var orig_obj=$(elem).find(".mapping_info").html();
+                var orig_obj=$(elem).find(".mapping_info").html();
             	$(elem).find(".mapping_info").html(text);
-            	$(elem).find(".mapping_info").one("click",function(){$(elem).find(".mapping_info").html(orig_obj);});
-              }
+            	$(elem).find(".mapping_info").one("click", function () {
+            	    $(elem).find(".mapping_info").html(orig_obj);
+            	});
+            }); */
 
             console.debug("new marker layer=",newMarker);
             //newMarker.setMap(map);