oskari-frontend
oskari-frontend copied to clipboard
Optimizing hover performance
Updating map hover to use OL 6 getFeatures function for hover hit detection.
getFeatures has better performance, but is less accurate than previously used forEachFeatureAtPixel.
Thanks! This was a good test but the functionality seems a bit off at least for point features with this change. Not sure if the reason is in OpenLayers since even on https://openlayers.org/en/latest/examples/hitdetect-vector.html the functionality feels "buggy" in a sense that when the cursor is not on any feature -> some feature is always "highlighted". Maybe we'll try this again on a later OL-version.