Hi Eric,<br><br>No...it is not working yet. There is some improvement indeed: I can see now the selection style, but vertexes are still not editable.<br><br>I have tried to adapt the suggestion in post I have mentioned earlier. <br>
<br><span style="color: rgb(0, 0, 102);">var styleMap = new OpenLayers.StyleMap(); </span><br style="color: rgb(0, 0, 102);"><br style="color: rgb(0, 0, 102);"><span style="color: rgb(0, 0, 102);">var rules = [new OpenLayers.Rule({</span><br style="color: rgb(0, 0, 102);">
<span style="color: rgb(0, 0, 102);">symbolizer: template, </span><br style="color: rgb(0, 0, 102);"><span style="color: rgb(0, 0, 102);">elseFilter: true</span><br style="color: rgb(0, 0, 102);"><span style="color: rgb(0, 0, 102);">})];</span><br style="color: rgb(0, 0, 102);">
<span style="color: rgb(0, 0, 102);">styleMap.styles[&quot;default&quot;].addRules(rules); </span><br><br>Using this the edit polygon works!!!. However, I did not figured out how to include &quot;context&quot; within this. Select style is also not visible (but I do not mind this, I can most probably find a work around for selection style).<br>
<br>Initially I have used:<br><span style="color: rgb(0, 0, 153);">var mystyle = new OpenLayers.Style(template, {context: context}); </span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">var styleMap = new OpenLayers.StyleMap(mystyle); </span><br>
And context worked fine.<br><br>Any hints on how to include context with rules?<br><br>Thank you,<br>Adorian<br><br><br><br><div class="gmail_quote">On Thu, Dec 4, 2008 at 5:58 PM, Eric Lemoine <span dir="ltr">&lt;<a href="mailto:eric.c2c@gmail.com">eric.c2c@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello<br>
<br>
Try:<br>
<br>
new OpenLayers.StyleMap({<br>
 &nbsp; &nbsp;&quot;default&quot;: yourStyle<br>
});<br>
<br>
Hope this helps,<br>
<br>
Eric<br>
<br>
2008/12/4, Adorian Ardelean &lt;<a href="mailto:mynature@gmail.com">mynature@gmail.com</a>&gt;:<br>
<div><div></div><div class="Wj3C7c">&gt; Hi again,<br>
&gt;<br>
&gt; I have eliminated also the context for style as a source of problem for the<br>
&gt; modifyFeature control not working. So it seems that just by specifying a<br>
&gt; styleMap as option when declaring the vector layer makes the modifyFeature<br>
&gt; control not functional.<br>
&gt;<br>
&gt; var template = {<br>
&gt; &nbsp; &nbsp; fillOpacity: 0.6,<br>
&gt; &nbsp; &nbsp; fillColor: &quot;red&quot;,<br>
&gt; &nbsp; &nbsp; strokeColor:&quot;orange&quot;,<br>
&gt; &nbsp; &nbsp; strokeWidth:&quot;1&quot;<br>
&gt; &nbsp; &nbsp; };<br>
&gt;<br>
&gt; var mystyle = new OpenLayers.Style(template);<br>
&gt;<br>
&gt; var regions = new OpenLayers.Layer.Vector(&quot;regions&quot;,{extractAttributes:true,<br>
&gt; format: OpenLayers.Format.GeoJSON, projection: new<br>
&gt; OpenLayers.Projection(&quot;EPSG:4326&quot;), styleMap: new<br>
&gt; OpenLayers.StyleMap(mystyle)});<br>
&gt;<br>
&gt;<br>
&gt; I think the solution might be somewhere in the post:<br>
&gt; StyleMap and ModifyFeatures aren&#39;t compatible ?I will give it a try.<br>
&gt;<br>
&gt; All the best,<br>
&gt; Adorian<br>
&gt;<br>
&gt;<br>
&gt; Dr. Adorian Ardelean<br>
&gt; coordinator of myNature Project<br>
&gt;<br>
&gt; <a href="http://mybiosis.info/nature/portal.php?pagename=firstpage" target="_blank">http://mybiosis.info/nature/portal.php?pagename=firstpage</a> [a Romanian<br>
&gt; biodiversity-database]<br>
&gt; <a href="http://mybiosis.info/nature/portal.php?pagename=adorian" target="_blank">http://mybiosis.info/nature/portal.php?pagename=adorian</a> [CV]<br>
&gt;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dr. Adorian Ardelean<br>coordinator of myNature Project<br><br>proiectul myNature<br>str. Rascoala din 1907 nr 12<br>Timisoara 300523<br>Romania<br><br><a href="http://mybiosis.info/nature/portal.php?pagename=firstpage">http://mybiosis.info/nature/portal.php?pagename=firstpage</a> [a Romanian biodiversity-database]<br>
<a href="http://mybiosis.info/nature/portal.php?pagename=adorian">http://mybiosis.info/nature/portal.php?pagename=adorian</a> [CV]<br><br><br>Projects in which I was involved:<br><a href="http://hercules.kgs.ku.edu/Hexacoral/Anemone2/">http://hercules.kgs.ku.edu/Hexacoral/Anemone2/</a> [Hexacorallians of the World]<br>
<a href="http://www.ubio.org">http://www.ubio.org</a> [uBio Project]<br><a href="http://portal.ubio.org">http://portal.ubio.org</a> [uBio Portal]<br><a href="http://microscope.mbl.edu">http://microscope.mbl.edu</a> [micro*scope Project]<br>
<a href="http://starcentral.mbl.edu/biopedia">http://starcentral.mbl.edu/biopedia</a> [BioPedia]<br><a href="http://starcentral.mbl.edu/custar">http://starcentral.mbl.edu/custar</a> [CU*STAR]<br><a href="http://planktonnet.awi.de/index.php">http://planktonnet.awi.de/index.php</a> [planktonNet]<br>
<br>Yahoo messenger: transylvaniasan<br>