ol-ext icon indicating copy to clipboard operation
ol-ext copied to clipboard

Possible deprecated feature in use: Event.Path

Open gio-giu opened this issue 2 years ago • 2 comments

Hi, a simple question: I am using ol-ext for a project of mine. However, when I use functions like the one below:

        map.on('singleclick', function (event) {
            const name = map.forEachFeatureAtPixel(event.pixel, function (feature) {
                return feature.get('name');
            });
        });

The following warning appears in my browser's console:

Screenshot 2022-07-13 225800

Is it safe to keep using such method? If not, will it be corrected anytime soon?

gio-giu avatar Jul 14 '22 08:07 gio-giu

The code you shared doesn't use ol-ext... It's a pure Openlayers function. What version of Openlayers are you using?

Viglino avatar Jul 19 '22 07:07 Viglino

Hi, thank you for you kind reply, and my apologize for the mistake. The OpenLayers version I am using is the latest, v6.15.1, as contained in this CDN: cdn

This message appears among the issues in Google Chrome's console...

gio-giu avatar Jul 19 '22 10:07 gio-giu