[Users] problem using 'legendURL'
karsten vennemann
karsten at terragis.net
Sat Feb 26 10:09:37 CET 2011
Hi,
I was wondering if the problem with setting a legendURL for a cached layer
still persists in GeoEXT trunc. I did go ahead and build GeoEXT from source
toady but it still seems not to work as expected.
I have this code
var legendLayerStore = mapPanel.layers;
// set legendurls
var landkreise_tile_rec =
legendLayerStore.getByLayer(landkreise_tile);
landkreise_tile_rec.set("legendURL","myurl/openlayers/vfs/gemeinde_leg.gif")
;
And can see inn firebug that the legendLayerStore is filled correctly with
the specified url but still I get a getlegend request call to the TileCache
layer.. Instead of the graphics file ...
I am using GeoEXT build r2438 ...
Thanks
Karsten
> -----Original Message-----
> From: Andreas Hocevar [mailto:ahocevar at opengeo.org]
> Sent: Thursday, November 25, 2010 00:23
> To: Bart van den Eijnden
> Cc: karsten vennemann; users at geoext.org
> Subject: Re: [Users] problem using 'legendURL'
>
> 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