[OpenLayers-Dev] Markers reprojection
Julien-Samuel Lacroix
jlacroix at mapgears.com
Mon Apr 21 15:03:45 EDT 2008
Christopher Schmidt wrote:
> In general, there is no good place that we can know that we should be
> reprojecting on these layers.
>
> Where do you think the reprojection code would live in this case? I
> don't like the idea of touching someone else's geometry. In the case of
> a Layer.GML or some such, the format is creating the geometry, so it
> never belonged to someone else to begin with, but with Layer.Vector and
> Layer.Marker, that's less true.
I'm not sure about the vector layers, but the markers could be
reprojected in the addMarker function:
addMarker: function(marker) {
if(this.projection != this.map.projection)
{
marker.lonlat.transform(this.projection, this.map.projection);
}
...
What do you think? Is there other uses of this class where this wouldn't
work?
Julien
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
More information about the Dev
mailing list