New update: the problem is present also if you add more than 1 point feature in the same vector layer. The first point is placed well, the second... no.<br><br><div class="gmail_quote">2008/10/31 Damiano Morosi <span dir="ltr"><<a href="mailto:damiano.morosi@gmail.com">damiano.morosi@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I correct: the problem is present only if you add two point features on two different vector layers.<br>
Stay tuned...<br><br><div class="gmail_quote">2008/10/31 Damiano Morosi <span dir="ltr"><<a href="mailto:damiano.morosi@gmail.com" target="_blank">damiano.morosi@gmail.com</a>></span><div><div></div><div class="Wj3C7c">
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br><br>I have a problem with vetor layer and IE7. The following (simplified) code works well in Firefox but unsurprisingly not in IE7, where the point is always displayed at the upper left corner, wherever you position it in the map.<br>
<br>----<br><br> <script type="text/javascript"> <br> <br> var map, layer, pointLayer, path; <br>
<br> var result_style = OpenLayers.Util.applyDefaults({ <br> strokeWidth: 3, <br>
strokeColor: "#ff0000", <br> fillOpacity: 100<br> }, OpenLayers.Feature.Vector.style['default']);<br><br> function init(){<br>
<br> var mapOptions = { ... }<br> map = new OpenLayers.Map( 'map', mapOptions); <br><br> layer = new OpenLayers.Layer.TileCache( "basic", <br>
["<a href="http://213.199.15.252/tilecache" target="_blank">http://213.199.15.252/tilecache</a>"], <br> 'basic'); <br> pointLayer = new OpenLayers.Layer.Vector("Zoom", {styl<br>
e: point_style});<br><br> map.addLayers([layer, pointLayer]);<br><br> }<br><br> <br> function showPoint(lon, lat) { <br> <br>
var point_wkt = 'POINT('+lon+' '+lat+')'; <br> parser = new OpenLayers.Format.WKT(); <br> var point_feat = parser.read(point_wkt); <br>
<br> pointLayer.destroyFeatures(); <br> <br>
pointLayer.addFeatures([point_feat]); <br> map.panTo(new OpenLayers.LonLat(lon, lat));<br> <br>
}<br> </script> <br><br>----<br><br>Thank you, please ask if you need more details.<br><font color="#888888"><br>Damiano Morosi<br>
</font></blockquote></div></div></div><br>
</blockquote></div><br>