[Users] Map center inkorrekt
mabra at manfbraun.de
mabra at manfbraun.de
Sun Aug 5 19:35:04 CEST 2012
Hi !
Much, much thanks for this information!
I dont understand this and have to have a deeper
look into OpenLayers and coordinates.
And sorry, for this really ultra-late reply. I thought,
I got no answer, but have had a little profile crash.
After restore, I found this message ;-)
Beste ragrds,
++mabra
From: Juan Rapoport [mailto:juanrapoport at suremptec.com.ar]
Sent: Monday, July 02, 2012 2:29 PM
To: mabra at manfbraun.de
Cc: users at geoext.org
Subject: Re: [Users] Map center inkorrekt
The map is in EPSG:900913 coordinate system, and you are trying to set the
map center in EPSG:4326 coordinate system (lat /lon).
You can transform coordinates like this:
var point = new OpenLayers.Geometry.Point(8.5315623, 49.4100709);
var EPSG4326 = new OpenLayers.Projection('EPSG:4326');
var EPSG900913 = new OpenLayers.Projection('EPSG:900913');
point.transform(EPSG4326, EPSG900913);
and then center the map:
center: [point.x, point.y]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120805/b1d04665/attachment.htm
More information about the Users
mailing list