Rename ol.View2D to ol.View
This commit is contained in:
@@ -34,7 +34,7 @@ Below you'll find a complete working example. Create a new file, copy in the co
|
||||
source: new ol.source.MapQuest({layer: 'sat'})
|
||||
})
|
||||
],
|
||||
view: new ol.View2D({
|
||||
view: new ol.View({
|
||||
center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
|
||||
zoom: 4
|
||||
})
|
||||
@@ -88,7 +88,7 @@ The map in the application is contained in a [`<div>` HTML element](http://en.wi
|
||||
source: new ol.source.MapQuest({layer: 'sat'})
|
||||
})
|
||||
],
|
||||
view: new ol.View2D({
|
||||
view: new ol.View({
|
||||
center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
|
||||
zoom: 4
|
||||
})
|
||||
@@ -121,10 +121,10 @@ The `layers: [ ... ]` array is used to define the list of layers available in th
|
||||
|
||||
Layers in OpenLayers 3 are defined with a type (Image, Tile or Vector) which contains a source. The source is the protocol used to get the map tiles. You can consult the list of [available layer sources here](/en/{{ latest }}/apidoc/ol.source.html)
|
||||
|
||||
The next part of the `Map` object is the `View`. The view allow to specify the center, resolution, and rotation of the map. Right now, only `View2D` is supported, but other views should be available at some point. The simplest way to define a view is to define a center point and a zoom level. Note that zoom level 0 is zoomed out.
|
||||
The next part of the `Map` object is the `View`. The view allow to specify the center, resolution, and rotation of the map. The simplest way to define a view is to define a center point and a zoom level. Note that zoom level 0 is zoomed out.
|
||||
|
||||
```js
|
||||
view: new ol.View2D({
|
||||
view: new ol.View({
|
||||
center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
|
||||
zoom: 4
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user