I&#39;ve seen that this is happening when I reload the layers.. For cleaning the map and redraw other things..<div><br></div><div><div>if (lyrTesting) {</div><div>                lyrTesting.destroy();</div><div>            }</div>
<div>            lyrTesting = new OpenLayers.Layer.Vector(&#39;Testing&#39;);</div><div>            map.addLayer(lyrTesting);</div><div><br></div><div>I&#39;ll investigate what is happening here.. </div><div><br></div><div>
Thanks!</div><div><br><br><div class="gmail_quote">2010/6/9 JuKiM <span dir="ltr">&lt;<a href="mailto:rifins@gmail.com">rifins@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,<div><br></div><div>I&#39;ll take a look to your examples..</div><div><br></div><div>But after a little searching I&#39;m trying do like this:</div><div><br></div><div><div class="im"><div>var polygonFeature = new OpenLayers.Feature.Vector(linearRing, null, style_poly);</div>

</div><div>polygonFeature.data.OLPosition = position;</div><div>polygonFeature.data.infoContent = szInformation;</div><div>lyrTesting.addFeatures([polygonFeature]);</div><div><br></div><div>var hoverSelect = new OpenLayers.Control.SelectFeature(lyrTesting, {</div>

<div><span style="white-space:pre">        </span>        toggle: true,</div><div><span style="white-space:pre">        </span>        multiple: false,</div><div><span style="white-space:pre">        </span>        geometryTypes: [&quot;OpenLayers.Geometry.LineString&quot;],</div>

<div><span style="white-space:pre">        </span>        renderIntent: &quot;temporary&quot;,</div><div><span style="white-space:pre">        </span>        eventListeners: {</div><div><span style="white-space:pre">        </span>            featurehighlighted: function(f) {</div>

<div><span style="white-space:pre">        </span>                var feature = new OpenLayers.Feature(lyrTesting, f.feature.data.OLPosition);</div><div><span style="white-space:pre">        </span>                feature.closeBox = true;</div>

<div><span style="white-space:pre">        </span>                feature.popupClass = popupClass;</div><div><span style="white-space:pre">        </span>                feature.data.popupContentHTML = f.feature.data.infoContent;</div>

<div><span style="white-space:pre">        </span>                feature.data.overflow = (true) ? &quot;auto&quot; : &quot;hidden&quot;;</div><div><span style="white-space:pre">        </span></div>
<div><span style="white-space:pre">        </span>                if (f.feature.popup == null) {</div><div><span style="white-space:pre">        </span>                    f.feature.popup = feature.createPopup(feature.closeBox);</div>

<div><span style="white-space:pre">        </span>                    map.addPopup(f.feature.popup);</div><div><span style="white-space:pre">        </span>                    f.feature.popup.show();</div>
<div><span style="white-space:pre">        </span>                } else {</div><div><span style="white-space:pre">        </span>                    f.feature.popup.toggle();</div><div><span style="white-space:pre">        </span>                }</div>

<div><span style="white-space:pre">        </span>            },</div><div><span style="white-space:pre">        </span>            featureunhighlighted: function(f) {</div><div><span style="white-space:pre">        </span>                if (f.feature.popup != null) {</div>

<div><span style="white-space:pre">        </span>                    f.feature.popup.destroy();</div><div><span style="white-space:pre">        </span>                    f.feature.popup = undefined;</div>
<div><span style="white-space:pre">        </span>                }</div><div><span style="white-space:pre">        </span>            }</div><div><span style="white-space:pre">        </span>        }</div>
<div><span style="white-space:pre">        </span>    });</div><div><br></div><div><br></div>The problem I get is when I try to redraw the map, an error is fired saying that there is an error with style in the next function. (Says that &#39;this.div.style&#39; is undefined or not an object.)</div>

<div>getZIndex:function(){return this.div.style.zIndex;}</div><div><br></div><div>What I&#39;m doing wrong?</div><div><br></div><div>Thanks!</div><div><br></div><div><br></div><div><br><div class="gmail_quote">2010/6/8 giraam <span dir="ltr">&lt;<a href="mailto:sdjbm17@gmail.com" target="_blank">sdjbm17@gmail.com</a>&gt;</span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi,<br>
<br>
Maybe you can find something useful here..<br>
<a href="http://trac.openlayers.org/wiki/UserRecipes" target="_blank">http://trac.openlayers.org/wiki/UserRecipes</a><br>
<a href="http://trac.openlayers.org/wiki/UserRecipes" target="_blank">http://trac.openlayers.org/wiki/UserRecipes</a>  =)<br>
<br>
Regards,<br>
<br>
-----<br>
just another web developer<br>
<font color="#888888">--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Register-click-event-on-OpenLayers-Feature-Vector-tp5154434p5155291.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Register-click-event-on-OpenLayers-Feature-Vector-tp5154434p5155291.html</a><br>


Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
</font><div><div></div><div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div></div></div><br></div>
</blockquote></div><br></div></div>