简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM