I'm relatively new to OpenLayers. How to insert a simple image (or logo/legend) on the map?
From this example, http://jsfiddle.net/expedio/od5eLpb9/
Is it possible to overlay the legend (that in this case is a simple image) on the map?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI'm relatively new to OpenLayers. How to insert a simple image (or logo/legend) on the map?
From this example, http://jsfiddle.net/expedio/od5eLpb9/
Is it possible to overlay the legend (that in this case is a simple image) on the map?
Just put the <div id="legende">...</div> in <div id="map"> like below:
Load a QGIS-Server-WMS-Layer to OpenLayer3
<div id="map"><div id="legende">
<h2>Legend:</h2>
<div class="udiv_legende" id="legende_1">
<img src="http://qgiscloud.com/expedio/wfs_t/wms?Service=WMS&REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=12&HEIGHT=12&LAYER=buffer">
<br>
<br>
</div>
</div></div>
and add the styling as:
#legende{
position: absolute;
z-index: 100000;
}
Now you further set the size and position of lengends in CSS only. All the Best