Quantcast
Channel: freelabs
Viewing all articles
Browse latest Browse all 13

[OpenLayers] Transform coordinates from a projection to an other

$
0
0

[OpenLayers, Javascript]

In that example we are going to transform latitude and longitude coordinates from epsg:3857 (Google Maps projection) to epsg:4326 (OpenLayers Projection) in just one line.

Substitute longitude and latitudine values to LON and LAT in the code.

point = new OpenLayers.LonLat(LON,LAT).transform('EPSG:4326', 'EPSG:3857');

In point you’ll have an OpenLayers readable point.

( See GIS StackExchange Answer: [go] )


Viewing all articles
Browse latest Browse all 13

Trending Articles