سؤال

I want to enable selecting line features in OpenLayer by clicking. How to select it by clicking on it or near it? For example: take a look at Google map maker.

هل كانت مفيدة؟

المحلول

Normally, when features already are on the vectorLayer, you should be able to enable selecting them just by using selectFeature control.

When you only use WMS on your map, you have tu write a request to get the features through WFS as WKT from your map server, add them to a vectorLayer and use the above selectFeature control to select/highlight them.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top