Use ol.proj.fromLonLat

This commit is contained in:
tsauerwein
2015-09-18 16:42:19 +09:00
parent b1f56c1e98
commit 263960aad1

View File

@@ -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 [`<div>` 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
})
```