[Users] UrlLegend
florent.gravin at bluecham.net
florent.gravin at bluecham.net
Thu May 6 13:38:54 CEST 2010
hi, thks for reply,
I've already the param preferredTypes: ['gx_urllegend'], but it's not the
point i think... because when the legendPanel creates the layerLegend, the
layerRecord "legendURL" haven't been set yet.. so, the only type it finds
on creation is gx_wmslegend
i need to specify it's an URL legend BEFORE the legendPanel have been
triggered to create and add the new LegendLayer
> Hi,
>
> you need to set preferredTypes on the LegendPanel, make it an array of
> "gx_urllegend" IIRC.
>
> Best regards,
> Bart
>
>> Hi,
>>
>> i would like to use URL to set my layers legend, instead of WMSLegend.
>> The
>> point is that i add my layers after the legendPanel is rendered (because
>> the user can choose to add some layers).
>>
>> As i understood, i have to
>>
>> 1. add my layer to the Map (this triggers to add a record to the
>> GeoExt.mapPanel.layers and this trigger to add its legend to the
>> legendPanel as WMSLegend type)
>>
>> 2. get the new layer record (mapPanel.layers.getAt(idx))
>>
>> 3. set lengURL param to the record..
>>
>> so when i specify i want an URL legend it's too late, it have already
>> been
>> aded to the legendPanel as the wrong type..
>>
>> so how could I specify that i want a url legend for my layers before all
>> geoext events have been triggerd
>>
>> thks for help
>>
>> flo
>>
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>
>
>
>
More information about the Users
mailing list