<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi,<BR><br><BR><br><BR>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.<BR><br><BR>To change the colors and legend, I just apply a new styleMap on my layer in this way : Ext.apply(myLayer, {styleMap: myNewStyleMap});<BR><br><BR>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.<BR><br><BR><br><BR>Is there a better way to change styleMap / rules on a layer, so the legend panel will be updated ?<BR><br><BR>Or is there a way to update the legend panel manually ?<BR><br><BR><br><BR><br><BR>Thanks for reading me,<BR>Pouniok.<BR>                                            </div></body>
</html>