jeudi 13 août 2015

Openlayers Control.SelectFeature makes marker click listeners stop working?

I'm been having some trouble with openlayers. I have a map with several markers being added dynamically to a layer called markerLayer. Each marker has a click listener that opens a popup window showing specific information. I have another layer called poiLayer where I add a list of features that have external graphics styles. After adding the first layer to the map, I add the second. The problem occurs when I activate a SelectFeature control like this:

 this.poiLayer.events.register('featureselected', this.poiLayer,this.poiFeatureSelected);

 selectControl = new OpenLayers.Control.SelectFeature(this.poiLayer);
 this.openLayersMap.addControl(selectControl);
 selectControl.activate();

Before activating the control, the marker click listeners work but after activating it, the feature selected listeners work but the marker click listeners no longer function. I'm new to open layers so I'm not really sure why this would be happening. Is there a way I can make both listeners work? Any help is appreciated. Thanks.




Aucun commentaire:

Enregistrer un commentaire