openlayers/ol-mapbox-style

The newly added layer cannot be queried.

YXYCZXY opened this issue · 1 comments

I added a new style using the applyStyle method and the layer is displayed.
But I can't get it with the getMapboxLayer method
image
image

Maybe this should be stated in the documentation: The utility functions getMapboxLayer(), addMapboxLayer(), updateMapboxLayer() and removeMapboxLayer() are only supposed to work with styles that get applied to a map or layer group, i.e. with apply(), not with applyStyle(), which applies a style to a layer (which neither the map nor a layer group knows about).