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">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><br>Damiano Morosi<br>