[Users] problem using 'legendURL'
Andreas Hocevar
ahocevar at opengeo.org
Thu Nov 25 09:23:04 CET 2010
It is broken in 1.0, but it works in trunk:
http://dev.geoext.org/trunk/geoext/examples/legendpanel.html
I had no time though to investigate what broke and fixed it.
Regards,
Andreas.
On Nov 25, 2010, at 09:18 , Bart van den Eijnden wrote:
> Hi,
>
> it seems something is broken, since also the legendurl button in the legend panel example does not work anymore.
>
> http://api.geoext.org/1.0/examples/legendpanel.html
>
> Can you please file a bug, and I'll try to look into it when I get some time.
>
> Best regards,
> Bart
>
> --
> Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html
>
> Bart van den Eijnden
> OSGIS
> bartvde at osgis.nl
>
> On Nov 24, 2010, at 7:17 PM, karsten vennemann wrote:
>
>> Ok changed but I still get a call to the wms layer for the legend instead of
>> the URL I provide see below. No errors otherwise...
>> I have no idea what’s going on
>>
>> I have this now
>> var legendLayerStore = mapPanel.layers;
>>
>> // set legendurls
>> var watershedsrec = legendLayerStore.getByLayer(watersheds);
>> watershedsrec.set("legendURL",
>> "http://myurl/legend/watersheds_legend.png");
>>
>> legendPanel = new GeoExt.LegendPanel({
>> title: 'legend',
>> collapsed : false,
>> collapsible : true,
>> defaults: {
>> labelCls: 'mylabel',
>> style: 'padding:5px'
>> },
>> bodyStyle: 'padding:5px',
>> autoScroll: true,
>> layerStore: legendLayerStore
>> })
>>
>> Karsten
>>
>>
>>
>>> -----Original Message-----
>>> From: Bart van den Eijnden (OSGIS) [mailto:bartvde at osgis.nl]
>>> Sent: Wednesday, November 24, 2010 04:29
>>> To: karsten vennemann
>>> Cc: users at geoext.org
>>> Subject: Re: [Users] problem using 'legendURL'
>>>
>>> Hi,
>>>
>>> you are creating a new store, don't do that.
>>>
>>> Use mapPanel.layers instead.
>>>
>>> Best regards,
>>> Bart
>>>
>>>>
>>>> Thanks I upgraded to v 1.0 at that resolved the function issue.
>>>> Now I can see in firebug that watershedsrec and publiclandsrec are
>>>> filled with the layerrec objects ...
>>>>
>>>> However I still get a wms getlegendgraphic call to retrieve the the
>>>> legend from my TileCache layer (which obviously doesn't get a valid
>>>> legend back) So is the anything else wrong with by approach - see
>>>> below
>>>>
>>>>
>>>> var legendLayerStore = new GeoExt.data.LayerStore({
>>>> map: map,
>>>> layers: [publiclands,watersheds,quads,counties,overlay1]
>>>> });
>>>>
>>>> // set legendurls
>>>> var watershedsrec =
>>> legendLayerStore.getByLayer(watersheds);
>>>> var publiclandsrec =
>>> legendLayerStore.getByLayer(publiclands);
>>>>
>>>> watershedsrec.set("legendURL",
>>>> "http://myurl/legend/watersheds_legend.png");
>>>> publiclandsrec.set("legendURL",
>>>> "http://myurl/legend/publiclands_legend.png")
>>>>
>>>> Karsten
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at geoext.org
>>>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>>>
>>>
>>>
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list