1

I am using geolocation feature of Openlayers 3.13, as in the examples. (http://openlayers.org/en/v3.13.0/examples/geolocation.html)

However I also have queryable point layers, and when I track the position, I cannot click under the "accuracy feature".

Do you know any way of avoiding this problem?

The best would be to not detect any feature at all for the accuracy (even not change the cursor).

I tried z index and render order, but they did not work.

I ended up removing accuracy, but I would like to find a solution.

1

If you are using ol.Map#forEachFeatureAtPixel for detecting clicks, you can set the optional layerFilter:

map.forEachFeatureAtPixel(pixel, function(feature) {
  // do something with detected features
}, undefined, function(layer) {
  return layer !== geolocationLayer;
});

In the above snippet, geolocationLayer is the vector layer from the example you linked.

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.