I have an Issue since I integrated FeaturePopups into my code and I don't know where to look anymore. Maybe it's not because of FeaturePopups anyway. Has this been tried by someone maybe?
Problem is I cannot select a drawn feature by clicking on it anymore. When I don't add the FeaturePopups-Control to the map at start, modifying works again. I looked through the FeaturePopups.js but didn't find anything that could interfere with the ModifyFeature. Both Controls use separate and different Layers.
I'm using a mixture of ExtJS 4 and OL2.13 and I justshow some snippets, hoping it's enough for the first view.
var fpControl = new OpenLayers.Control.FeaturePopups({
boxSelectionOptions: {},
id: 'idGeomaerkerFeatureInfo',
popupOptions: {'single': {closeBox: true, popupClass: OpenLayers.Popup.Anchored}},
// mode: 'NONE',
layers: [
[
// Uses: Templates for hover & select and safe selection
geomaerkerlayer_points, {
templates: {
// hover: single & list
// hover: '${.status}',
hover: function(feature){
switch(feature.attributes.status) {
case "ungeprueft":
return '<table width="370px" style="background-color:#E9F2FF; margin-left:0px; font-family:Verdana, Geneva, Arial, Helvetica, sans-serif; font-size:10pt; border-spacing: 0px;">'
...
map.map.addControl(fpControl);
this.drawLayer = new OpenLayers.Layer.Vector('GeomaerkerDraw');
this.drawLayer.displayInLayerSwitcher = false;
this.drawLayer.setVisiblitiy = false;
this.polygonDraw = new OpenLayers.Control.DrawFeature(
this.drawLayer, OpenLayers.Handler.Polygon);
this.polygonDraw.handler.stopDown = true;
this.polygonDraw.handler.stopUp = true;
this.modify = new OpenLayers.Control.ModifyFeature(this.drawLayer);
this.modify.mode = OpenLayers.Control.ModifyFeature.RESHAPE;
this.drawLayer.events.on({"beforefeatureadded": function(){
if (this.features.length > 0){
this.removeFeatures(this.features[0]);
}
}});
...
/**
* Activate the tool to modify previously drawn features.
*/
modifyFeature: function(button) {
this.deactivate();
this.deactivateOthers();
this.modify.activate();
},
I would really appreciate it getting some help here. After all I really like the FeaturePopups and don't want to miss it. Thanks