CodeBuggy
CodeBuggy

Reputation: 499

How to create Openlayer Feature previews in a dropdown menu?

I am trying to create a menu which shows the list of openLayer Features saved in database with a preview option.each preview can have multiple Openlayer features(grouped features).I couldn't find a way to place the features in a small scale area. Do you have any ideas for achieving this? I am using Openlayers4.

When I click the drop down options, the features will be placed over the map based on the GeoJSON saved in db. I tried to put the items in a small canvas which is not working

Upvotes: 0

Views: 1154

Answers (1)

Viglino Jean-Marc
Viglino Jean-Marc

Reputation: 1421

The ol.control.Legend of ol-ext has a getStyleImage method to get a canvas legend of the feature. Look at this example http://viglino.github.io/ol-ext/examples/legend/map.control.legend.html

Upvotes: 2

Related Questions