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

ol-ext Control Legend display

Open ngjiajunsg opened this issue 3 years ago • 3 comments

Currently the Legend display is using the feature to add and display

but i was wonder if i want to display instead of the feature that is added to map, i wish to do another legends that is found on https://www.openstreetmap.org/key.

wonder how to put the subset of the key above of the url to display?

ngjiajunsg avatar Nov 11 '21 08:11 ngjiajunsg

It's not possible yet but I plan to add possibility to set legend items such as images or other legends associated to a layer. No time to do it yet but I'll try to implement it asap.

Viglino avatar Nov 11 '21 16:11 Viglino

ok thanks.

ngjiajunsg avatar Nov 15 '21 08:11 ngjiajunsg

Great to hear. I was just working on upgrading our library from 3.1.14 to 3.2.4 but was having issues with the legend component.

jamador-usgs avatar Nov 16 '21 17:11 jamador-usgs

@ngjiajunsg I've added an ol/legend/Image item to add a legend image See: https://viglino.github.io/ol-ext/examples/legend/map.control.legend.image.html

You can also link the legend to a layer to have it visible when the layer is visible. See: https://viglino.github.io/ol-ext/examples/legend/map.control.legend.layer.html

Viglino avatar Oct 25 '22 13:10 Viglino