[Users] legend for OpenLayers.Layer.Image
Charlton Galvarino
charlton at 2creek.com
Thu Sep 23 18:37:53 CEST 2010
> > 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?
> 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.
Sadly, something like this (if I am interpreting your suggestion correctly), doesn't magically make the legend appear:
map.addLayer(new OpenLayers.Layer.Image(
name
,urlLyr
,bounds
,size
,{isBaseLayer : false,opacity : 1,legendUrl : urlLeg}
));
More information about the Users
mailing list