Port examples to new extents

This commit is contained in:
Tom Payne
2013-04-16 16:28:41 +02:00
parent f81658f542
commit a642868cfa
5 changed files with 10 additions and 14 deletions
+4 -4
View File
@@ -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]
})
})
],