Ah thanks,

Ok my select feature looks like this.

       //Create and add selectFeature control
       var select_feature_control = new OpenLayers.Control.SelectFeature(
              pointLayer,
              {
                     multiple: false,
                     toggle: true,
                     toggleKey: 'ctrlKey',
                     multipleKey: 'shiftKey'
              }
       );

       var select_feature_control_ten = new OpenLayers.Control.SelectFeature(
              leaseLayer,
              {
                     multiple: false,
                     toggle: true,
                     toggleKey: 'ctrlKey',
                     multipleKey: 'shiftKey'
              }
       );

What you are saying is that I can combine these 2 in one?

From: Dominik Mikiewicz [mailto:[email protected]]
Sent: 04 June 2012 02:57 PM
To: Riaan Lombaard
Subject: RE: [OpenLayers-Users] OpenLayers.Control.SelectFeature

Your top select control 'covers' the other control.
You can use one select control for both layers.

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Riaan Lombaard
Sent: Monday, June 04, 2012 2:36 PM
To: [email protected]<mailto:[email protected]>
Subject: [OpenLayers-Users] OpenLayers.Control.SelectFeature

Hey Guys,

Please assist.

I have 2 layers.
Layer 1. Vector Layer using only `OpenLayers.Geometry.Point` functionality.
Layer2. Vector Layer using only `OpenLayers.Geometry.LinearRing` functionality.

Now both of them have their own `OpenLayers.Control.SelectFeature` obviously 
adding, activating and registering the features on the map.

The issue I am having is, when both layers are active only one of the layers 
selection functionality will work.

For example if Layer1 and 2 are active, only Layer2 selection will work.
Only when I disable Layer2 then Layer1 selection will work.

Hope this make's sense. Please let me know if you need more information.

Riaan
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to