Hi folks,<div><br></div><div>After a thorough revision of my code, I noticed that when testes OL 2.11 I added this line of code.</div><div>OpenLayers.Layer.Vector.prototype.renderers = [&quot;SVG2&quot;, &quot;VML&quot;, &quot;Canvas&quot;];</div>
<div><br></div><div>For some reason this screws up my OL 2.10. After deleting this, OL works fine.</div><div><br></div><div>Can anyone explain what that line of code does ?</div><div><br></div><div>What I cant get to work is the property cursor:&quot;pointer&quot; in the style.</div>
<div><br></div><div>I will keep you posted. </div><div><br></div><div>Pointers are always welcome</div><div><br></div><div><br></div><div>Ricardo</div><div><br></div><div><br><br><div class="gmail_quote">2011/6/7 Ricardo Bayley <span dir="ltr">&lt;<a href="mailto:ricardo.bayley@gmail.com">ricardo.bayley@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Folks,<div><br></div><div>I have this code</div><div>                </div><div><b>                var q = arguments[0];</b></div>
<div><div><b><span style="white-space:pre-wrap">                </span>var format = new OpenLayers.Format.GeoJSON({</b></div>

<div><b><span style="white-space:pre-wrap">        </span>               &#39;internalProjection&#39;: map.baseLayer.projection,    // 900913</b></div><div><b><span style="white-space:pre-wrap">        </span>               &#39;externalProjection&#39;: new OpenLayers.Projection(&#39;EPSG:4326&#39;)</b></div>


<div><b><span style="white-space:pre-wrap">                </span>});</b></div><div><b><span style="white-space:pre-wrap">                </span>var features = format.read(js);</b></div><div><b><span style="white-space:pre-wrap">                </span>q.layer.addFeatures(features);</b></div>


</div><div><b><br></b></div><div><div><font color="#660000"><b><span style="white-space:pre-wrap">                </span>var z = map.getZoomForExtent(q.layer.getDataExtent())-1;</b></font></div>
<div><font color="#660000"><b><span style="white-space:pre-wrap">                </span>map.setCenter(q.layer.getDataExtent().getCenterLonLat(), z);</b></font></div></div><div><br></div><div><br></div><div>
so far, everything works fine. Layer gets loaded with the features, and the are displayed.</div><div>the last two lines of code  are giving me serious trouble. Don&#39;t know why, but features get duplicated and are slightly moved as if rendered at different scale or resolution.</div>


<div><br></div><div>As soon as I pan the map, or switch base layers, or do anything that gets the map to &quot;refresh&quot;, duplicated features are gone.</div><div>If I don&#39;t zoom to the max extent of the layer, I dont get the duplicates.</div>

<div>
I do a console.debug(q.layer) and I don&#39;t see any duplicated features. Layer only has 50 features as it should.</div><div><br></div><div>It got me thinking, and since this might also be a styling issue, this is the style I use.</div>

<div><div><br></div><div><div><b>    var myStyle = new OpenLayers.StyleMap({</b></div><div><b>        &quot;default&quot;: new OpenLayers.Style({</b></div><div><b><span style="white-space:pre-wrap">        </span>        <span style="white-space:pre-wrap">        </span>cursor:&quot;pointer&quot;,</b></div>

<div><b><span style="white-space:pre-wrap">        </span>        <span style="white-space:pre-wrap">        </span>graphicZIndex: &quot;${getZIndex}&quot;</b></div><div><b><br></b></div><div><b>        },{context:funciones,</b></div>

<div><b>            rules: [</b></div><div><b>                    new OpenLayers.Rule({</b></div><div><b>                        // a rule contains an optional filter</b></div><div><b>                        filter: new OpenLayers.Filter.Comparison({</b></div>

<div><b>                            type: OpenLayers.Filter.Comparison.LESS_THAN,</b></div><div><b>                            property: &quot;fid&quot;, // the &quot;&quot; feature attribute</b></div><div><b>                            value: 15 // first 15</b></div>

<div><b>                        }),</b></div><div><b>                        // if a feature matches the above filter, use this symbolizer</b></div><div><b>                        symbolizer: {</b></div><div><b>            <span style="white-space:pre-wrap">                                </span>graphicHeight: 27,</b></div>

<div><b>            <span style="white-space:pre-wrap">                                </span>graphicWidth : 27,</b></div><div><b>                            externalGraphic: &quot;${getIcon}&quot;,</b></div><div><b>                            graphicYOffset : &quot;${getYOffset}&quot;</b></div>

<div><b>                        }</b></div><div><b>                    }), </b></div><div><b>                    new OpenLayers.Rule({</b></div><div><b>                        // apply this rule if no others apply</b></div>

<div><b>                        elseFilter: true,</b></div><div><b>                        symbolizer: {</b></div><div><b>                        <span style="white-space:pre-wrap">        </span>cursor:&quot;pointer&quot;,</b></div>

<div><b>                        <span style="white-space:pre-wrap">        </span>pointRadius: 4, // based on feature.attributes.type</b></div><div><b>                            fillColor: &quot;#5781FC&quot;,</b></div>
<div><b>                            strokeColor: &quot;#000000&quot;,</b></div><div><b>                            strokeWidth: &quot;1&quot;</b></div><div><b>                        }</b></div><div><b>                    })</b></div>

<div><b>             ]<span style="white-space:pre-wrap">        </span>        </b></div><div><b>        }),</b></div><div><b>        &quot;select&quot;:new OpenLayers.Style({</b></div><div><b>            graphicZIndex: 101</b></div>

<div><b>        })</b></div><div><b>    });</b></div></div></div><div><br></div><div>Anyhow, I attach a screenshot so you can see what I am talking about.</div>
<div><br></div><div>Any pointers greatly appreciated</div><div><br></div><font color="#888888"><div>Ricardo</div>
</font></blockquote></div><br></div>