Dear Maven,

> `OpenLayers.Marker` have no native support methods like `setPosition()` 
> or something else to update its position.
> 
> Since in my opinion, destroy-create-destroy.. will be a performance
consuming problem, that is why I keep one object of  `Marker` to reuse it.
> 

I found a solution.

It seems the problem isn't in the "moveTo" function but what is passed to it.

I just tried the following new "updateMarker" version and it works as expected.

----------------> BEGIN 

function updateMaker(myMarkerIn, pos) {
myMarkerIn.moveTo(map.getLayerPxFromViewPortPx(map.getPixelFromLonLat(pos)));
}

<---------------- END

Regards

Mario Danelli 


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to