Openlayers Control.SelectFeature makes marker click listeners stop working?

المشرف العام

Administrator
طاقم الإدارة
I'm been having some trouble with openlayers. I have a map with several markers being added dynamically to a marker layer called markerLayer. Each marker has a click listener that opens a popup window showing specific information. I have another vector 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. I've read that if it should work if I use a vector layer instead of a marker layer. Is there a way I can make both listeners work without having to resort to this? Any help is appreciated. Thanks.



أكثر...
 
أعلى