comparison gis_gui/blocks/layer.js @ 194:6f6f109bb6ca

Text from Features in a Side-Info-Box
author fknauft
date Wed, 16 Feb 2011 16:15:57 +0100
parents 1d5d50a94024
children f1b76cc939f4
comparison
equal deleted inserted replaced
193:e6a754b05ec8 194:6f6f109bb6ca
140 }; 140 };
141 var map = new google.maps.Map(le, mapOpts); 141 var map = new google.maps.Map(le, mapOpts);
142 console.debug("new google map=",map," on el=",le); 142 console.debug("new google map=",map," on el=",le);
143 143
144 //geocoder = new google.maps.Geocoder(); 144 //geocoder = new google.maps.Geocoder();
145 var newMarker=new google.maps.KmlLayer(kmlURL); 145 var newMarker=new google.maps.KmlLayer(kmlURL,{ suppressInfoWindows: true, map: map});
146
147 google.maps.event.addListener(newMarker, 'click', function(kmlEvent) {
148 var text = kmlEvent.featureData.description;
149 showInContentWindow(text);
150 });
151
152 function showInContentWindow(text) {
153 var sidediv = document.getElementById('mapping_info');
154 sidediv.innerHTML = text;
155 }
156
146 console.debug("new marker layer=",newMarker); 157 console.debug("new marker layer=",newMarker);
147 newMarker.setMap(map); 158 //newMarker.setMap(map);
148 } 159 }
149 }); 160 });
150 161
151 }; 162 };
152 163