Is there a way to select multiple features from multiple vector layers by using clickTolerance in click? I checked the documents of getFeature control and selectFeature control, seems not work in this way.

I know that it is possible to select multiple features by holding down Shift key. That's OK in a desktop environment, but it's not desirable in mobile/tablets. So I'm looking for a different solution.


This example should show you exactly what you need.


  • thanks for your reply. but by clicking the selectFeature control can only select one feature at once, also there is no clickTolerance to set; by using box selection, user can select several features from multi layers. however, somehow in mobile devices it doesn't support clickout. – Simon Aug 26 '11 at 0:16
  • Of course you can select multi, just press shift. As for clickTolerance that is an option you should be able to set at control creation. As I said that is an example you should copy it locally and customize it. As for mobile support OpenLayers is currently making a considerable effort to implement touch functionality for mobile devices. I'm pretty sure it will be done when 2.11 is available. – unicoletti Aug 26 '11 at 6:42
  • first, clickTolerance is not an option in selectFeature control; second, i know in destop it's OK to select several features by pressing Shift or any other key, but it's not desirable in mobile/tablets; i was trying to integrate the config options of GetFeature Control which has clickTolerance and SelectFeature Control which enables the application in multi-layers, but failed... – Simon Aug 31 '11 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.