I correct: the problem is present only if you add two point features on two
different vector layers.
Stay tuned...

2008/10/31 Damiano Morosi <[EMAIL PROTECTED]>

> Hi all,
>
> 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.
>
> ----
>
>         <script
> type="text/javascript">
>
>                 var map, layer, pointLayer,
> path;
>
>
>                 var result_style =
> OpenLayers.Util.applyDefaults({
>                         strokeWidth:
> 3,
>                         strokeColor:
> "#ff0000",
>                         fillOpacity: 100
>                 }, OpenLayers.Feature.Vector.style['default']);
>
>                 function init(){
>
>                         var mapOptions = { ... }
>                         map = new OpenLayers.Map( 'map', mapOptions);
>
>                         layer = new OpenLayers.Layer.TileCache(
> "basic",
>                                 ["http://213.199.15.252/tilecache";],
>
>                                 'basic');
>                         pointLayer = new OpenLayers.Layer.Vector("Zoom",
> {styl
> e: point_style});
>
>                         map.addLayers([layer, pointLayer]);
>
>         }
>
>
>         function showPoint(lon, lat) {
>
>
>                         var point_wkt = 'POINT('+lon+'
> '+lat+')';
>                         parser = new
> OpenLayers.Format.WKT();
>                         var point_feat =
> parser.read(point_wkt);
>
>
>
> pointLayer.destroyFeatures();
>
>
>
> pointLayer.addFeatures([point_feat]);
>                         map.panTo(new OpenLayers.LonLat(lon, lat));
>
>
>                 }
>     </script>
>
> ----
>
> Thank you, please ask if you need more details.
>
> Damiano Morosi
>
_______________________________________________
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev

Reply via email to