[Users] problem using 'legendURL'

Roald de Wit list at rdewit.net
Thu Oct 20 10:59:17 CEST 2011


Ticket created: http://trac.geoext.org/ticket/452

On 20/10/11 16:15, Roald de Wit wrote:
> Hi,
>
> Something strange is going on here: the problem only manifests itself in
> a single file build: when using the multiple files, all works as
> expected (even in 1.0!), but when building a single file, the legendURL
> gets ignored. It seems that UrlLegend does not even get initialised!
>
> When I concatenate all files mentioned in lib/GeoExt.js in the order of
> appearance in that file: all good. When running 'make lib': it's broken
> (also when creating an uncompressed file with jsbuild). It seems that
> there is some dependency not working as it should.
>
> Anybody any idea what that dependency might be?
>
> Regards, Roald
>
> On 25/11/10 19:23, Andreas Hocevar wrote:
>> 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
>>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users


More information about the Users mailing list