[OpenLayers-Users] need help with projection issues

Thomas Wood grand.edgemaster at gmail.com
Mon Jan 14 17:17:17 EST 2008


On Jan 14, 2008 8:08 PM, Linda Rawson <linda.rawson at gmail.com> wrote:
> As far as displaying the mouseposition I added this to that code.
> if (this.map.projection = "EPSG:900913" ) {
>
> var v_lonLat =
> OpenLayers.Layer.SphericalMercator.inverseMercator(lonLat.lon, lonLat.lat);
>
> lonLat.lon = v_lonLat.lon;
>
> lonLat.lat = v_lonLat.lat;
>
> v_lonLat = null;
>
> }
>
>
>
> var digits = parseInt(this.numdigits);
>
> var newHtml =
>
> this.prefix + " Lon: " +
>
> lonLat.lon.toFixed(digits) +
>
> this.separator + " Lat: " +
>
> lonLat.lat.toFixed(digits) +
>
> this.suffix;Linda
>

In this case (assuming trunk is used), it is much easier just to set
the displayProjection variable on the map object.

-- 
Regards,
Thomas Wood
(Edgemaster)



More information about the Users mailing list