Only request tiles within the layer extent

Layer renderers are now responsible for requesting data within a limited extent.
This commit is contained in:
Tim Schaub
2014-07-06 23:30:59 -06:00
parent 234cff4de5
commit 2b0284a342
9 changed files with 38 additions and 11 deletions

View File

@@ -44,6 +44,7 @@ ol.proj.addCoordinateTransforms('EPSG:4326', projection,
var extent = [420000, 30000, 900000, 350000];
var layers = [
new ol.layer.Tile({
extent: extent,
source: new ol.source.TileWMS({
url: 'http://wms.geo.admin.ch/',
crossOrigin: 'anonymous',
@@ -57,11 +58,11 @@ var layers = [
'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale',
'FORMAT': 'image/jpeg'
},
extent: extent,
serverType: 'mapserver'
})
}),
new ol.layer.Tile({
extent: extent,
source: new ol.source.TileWMS({
url: 'http://wms.geo.admin.ch/',
crossOrigin: 'anonymous',
@@ -72,7 +73,6 @@ var layers = [
'National parks / geo.admin.ch</a>'
})],
params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'},
extent: extent,
serverType: 'mapserver'
})
})