[Users] legend for OpenLayers.Layer.Image
Eric Lemoine
eric.lemoine at camptocamp.com
Tue Sep 21 09:59:31 CEST 2010
On Fri, Sep 17, 2010 at 8:18 PM, Charlton Galvarino <charlton at 2creek.com> wrote:
> If I tacked on a legendURL attr to an OpenLayers.Layer.Image, what would it take to have that legend show up magically alongside WMS legends and vector legends inside a GeoExt.LegendPanel?
>
> Would I need to follow WMSLegend.js's lead and do something like:
>
> GeoExt.ImageLegend = Ext.extend(GeoExt.LayerLegend,{
> ...
>
> Or is there a simple switch I could flick that would allow this to happen? I'm having a tough time getting that extend to work. If it's the right way to go, I'm looking for encouragement to soldier on.
>
> UrlLegend.js looks really simple, and I'd love to somehow get that hooked to my little Image layer.
I think you should be able to rely on UrlLegend. What you need is a
"legendUrl" data field in the layer record associated with your Image
layer.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list