[OpenLayers-Users] 2 SelectFeature at once?

GordonHo llian at gmx.net
Thu Nov 13 20:24:45 EST 2008


hi,

im fairly new to OpenLayers, though i've to admit that i like it.

im currently having a problem with 2 selectfeatures:

  var select = new OpenLayers.Control.SelectFeature(
      markers, {hover: true}
   );
  map.addControl(select);
  select.activate();
             
  markers.events.on({"featureselected": displayInfos});
  markers.events.on({"featureunselected": undisplayInfos});


  var clickSelect = new OpenLayers.Control.SelectFeature(
      markers,
      {
            clickout: false, toggle: false,
            multiple: false, hover: false,
            box: false,
            onSelect: displayTrack
      }
   );
  map.addControl(clickSelect);
  clickSelect.activate();

both selectfeatures work fine if used alone, but combined i only the hover
effect works with the mouse.
although its possible with box set to true, to select boxes with the shift
Lmouse rectangle.

is it possible to get both features selectworking together, using only mouse
input (hover for the first, click/select for the second)?

thanks alot, and best regards

gordon 
-- 
View this message in context: http://n2.nabble.com/2-SelectFeature-at-once--tp1496620p1496620.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list