Port examples to new extents
This commit is contained in:
+4
-4
@@ -1,7 +1,7 @@
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.RendererHint');
|
||||
goog.require('ol.View2D');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.layer.TileLayer');
|
||||
goog.require('ol.projection');
|
||||
goog.require('ol.source.OSM');
|
||||
@@ -11,7 +11,7 @@ goog.require('ol.tilegrid.WMTS');
|
||||
|
||||
var projection = ol.projection.get('EPSG:900913');
|
||||
var projectionExtent = projection.getExtent();
|
||||
var size = projectionExtent.getWidth() / 256;
|
||||
var size = ol.extent.getWidth(projectionExtent) / 256;
|
||||
var resolutions = new Array(26);
|
||||
var matrixIds = new Array(26);
|
||||
for (var z = 0; z < 26; ++z) {
|
||||
@@ -34,12 +34,12 @@ var map = new ol.Map({
|
||||
format: 'image/png',
|
||||
projection: projection,
|
||||
tileGrid: new ol.tilegrid.WMTS({
|
||||
origin: projectionExtent.getTopLeft(),
|
||||
origin: ol.extent.getTopLeft(projectionExtent),
|
||||
resolutions: resolutions,
|
||||
matrixIds: matrixIds
|
||||
}),
|
||||
style: '_null',
|
||||
extent: new ol.Extent(-13682835, 5204068, -13667473, 5221690)
|
||||
extent: [-13682835, -13667473, 5204068, 5221690]
|
||||
})
|
||||
})
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user