coordinates - Using OSM and EPSG:4326 with openlayers increase latitude in near 90 degrees. Why? -
i using openlayers , creating osm base of operations layer. default layer utilize epsg:900913 , coordinates in meters. want utilize coordinates in degrees epsg:4326 initilize layer with:
base_layer.addoptions({ sphericalmercator: true, projection: new openlayers.projection('epsg:4326')}, true);
now map uses degrees have next problem: point latitude 37.296 , longitude -5.929 (http://www.openstreetmap.org/?lat=37.296&lon=-5.929&zoom=12&layers=q# , same coordinates in google maps) appears me (moving map , executing map.getcenter()
in firebug) in lat. -49.75, lon. -5.929.
why? how can utilize osm layer same degrees coordinates in openstreetmap.org
, returned nominatim.openstreetmap.org
?
you can't claim layer epsg:4326
when tiles displaying rendered in epsg:3857
. nonsensical.
i'm not quite clear on trying here honest, may help set displayprojection
epsg:4326
cause openlayers utilize degrees when communicating values to/from user.
if want to read or set map location in code need reproject value getcenter
or give setcenter
calling transform
method on location value.
coordinates openlayers openstreetmap
No comments:
Post a Comment