From b1f56c1e986dbe1840c5c74390d32bd4c7f8c78e Mon Sep 17 00:00:00 2001 From: tsauerwein Date: Fri, 18 Sep 2015 16:35:44 +0900 Subject: [PATCH 1/2] Fix lat/lon order --- doc/quickstart.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/quickstart.hbs b/doc/quickstart.hbs index 4fa37ef1ec..3a602c4d6a 100644 --- a/doc/quickstart.hbs +++ b/doc/quickstart.hbs @@ -130,4 +130,4 @@ The next part of the `Map` object is the `View`. The view allow to specify the c }) ``` -You will notice that the `center` specified is in lat/lon coordinates (EPSG:4326). Since the only layer we use is in Spherical Mercator projection (EPSG:3857), we can reproject them on the fly to be able to zoom the map on the right coordinates. +You will notice that the `center` specified is in lon/lat coordinates (EPSG:4326). Since the only layer we use is in Spherical Mercator projection (EPSG:3857), we can reproject them on the fly to be able to zoom the map on the right coordinates. From 263960aad11aaa72f42fb7ef9cb065f7d5828764 Mon Sep 17 00:00:00 2001 From: tsauerwein Date: Fri, 18 Sep 2015 16:42:19 +0900 Subject: [PATCH 2/2] Use ol.proj.fromLonLat --- doc/quickstart.hbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/quickstart.hbs b/doc/quickstart.hbs index 3a602c4d6a..3576b395d7 100644 --- a/doc/quickstart.hbs +++ b/doc/quickstart.hbs @@ -35,7 +35,7 @@ Below you'll find a complete working example. Create a new file, copy in the co }) ], view: new ol.View({ - center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'), + center: ol.proj.fromLonLat([37.41, 8.82]), zoom: 4 }) }); @@ -89,7 +89,7 @@ The map in the application is contained in a [`
` HTML element](http://en.wi }) ], view: new ol.View({ - center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'), + center: ol.proj.fromLonLat([37.41, 8.82]), zoom: 4 }) }); @@ -125,7 +125,7 @@ The next part of the `Map` object is the `View`. The view allow to specify the c ```js view: new ol.View({ - center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'), + center: ol.proj.fromLonLat([37.41, 8.82]), zoom: 4 }) ```