[OpenLayers-Users] legend "floating" over map
Donald Kerr
donald.kerr at dkerr.co.uk
Tue Nov 27 13:36:34 PST 2012
Can you not just use an absolute/relative positioned div and put the image
in that?
From: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of Phil Scadden
Sent: 27 November 2012 21:04
To: openlayers-users at lists.osgeo.org
Subject: Re: [OpenLayers-Users] legend "floating" over map
I've been scratching my head over this, no clear idea so far. I have a WMS
layer served with mapserver and want to display with it a legend image (PNG)
"floating" over the WMS. It means, when I move the WMS in OpenLayers, the
legend is always in the same place, ie, top-left corner of my screen. I
generated this legend, a sample is attached. I remember an example about
this in the Geoext examples web site but it's not longer there (if it
existed). Any idea about doing this is appreciated, thanks.
Create a popup - position on map where you want it. Put the legend image
into a popup (img tag in the html). If you have geoext loaded as well, the
strongly consider Alexandre Dube LayerTreebuilder ux as an alternative (used
on my PBE website) to build the legend.
Notice: This email and any attachments are confidential. If received in
error please destroy and immediately notify us. Do not copy or disclose the
contents.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121127/4ec92ce7/attachment.html>
More information about the Users
mailing list