On Thu, Sep 23, 2010 at 6:37 PM, Charlton Galvarino <[email protected]> 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?
>
>> 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}
>  ));
>

This won't work. "legendUrl" must be set in the layer record, as
opposed to the layer. For further help please paste your code that
creates the map, layers, and the MapPanel.

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to