[Users] Geoext Popup Question
Jason Woolard
Jason.Woolard at noaa.gov
Thu Jul 29 22:45:37 CEST 2010
hi all,
I've been able to cobble together some working popups from a kml layer
based on the tutorial and examples. Currently the popups only work when
a single layer is selected. If I turn on other layers the first selected
layer is the only layer that continues to work. I'm wondering if it's
possible to have the popups work when more than one layer in the tree is
selected?
I'd also like to have several kml layers with popups on the page. What
I've done based on the examples is issue a new
OpenLayers.Control.SelectFeature for each kml layer, the popups are
closed with something like this:
// unselect feature when the popup
// is closed
popup.on({
close: function() {
selectCtrl1.unselect(this.feature);
selectCtrl2.unselect(this.feature);
etc...
etc...
etc...
}
});
And the popups are created with these:
// create popup on "featureselected"
C17275410.events.on({
featureselected: function(e) {
createPopup(e.feature);
}
});
// create popup on "featureselected"
C17358063.events.on({
featureselected: function(e) {
createPopup(e.feature);
}
});
I wondering if I'm on the wrong track doing this the hard way or if
there is maybe a better way to create one popup and reuse it each time
you click the kml layer?
The working page can be viewed at:
http://ngs.woc.noaa.gov/storms/nov09_ne/ge/2010dev/index6.html
And the js at:
http://ngs.woc.noaa.gov/storms/nov09_ne/ge/2010dev/tree6.js
Thanks in advance for any comments or advice.
More information about the Users
mailing list