[Users] How to update LegendPanel after changing layer's styleMap property

Pou Pou pouniok at hotmail.com
Wed Jan 11 13:40:45 CET 2012


Hi,




In my application, I need to let users add vector layers. The layer's data depends on many user choices, and if they change one filter, I need to reload the data for the current vector layer.


To change the colors and legend, I just apply a new styleMap on my layer in this way : Ext.apply(myLayer, {styleMap: myNewStyleMap});


Then, I need to update the legendPanel, so it can display the new styleMap rules, but I don't know how to do that. I tried legendpanel update, layer refresh, layerstore reload, but nothing worked.




Is there a better way to change styleMap / rules on a layer, so the legend panel will be updated ?


Or is there a way to update the legend panel manually ?






Thanks for reading me,
Pouniok.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120111/b932f3c2/attachment.htm 


More information about the Users mailing list