Dear all,
The aim is to bring up Popup if line feature is clicked and no Popup if
click is done outside of the line. Unfortunately clicking outside the line
selects some other line features and brings Popup. I tried to play with I
guess selection is based on bounding box of the line features. What is the
proper way to solve this problem? Below is my code.
Any help would be highly appreciated
var streams = new OpenLayers.Layer.WMS(…);
streamControl = new OpenLayers.Control.GetFeature({
protocol: OpenLayers.Protocol.WFS.fromWMSLayer(streams),
box: false,
toggleKey: "ctrlKey",
});
streamControl.events.register('featureselected', this, function(e) {
var popupStream = new OpenLayers.Popup("chicken",
lonlatMouseClick,
new OpenLayers.Size(200,200),
e.feature.attributes.gew_name,
true);
map.addPopup(popupStream);
popupStream.show();
});
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users