Limit image layer requests to layer extent
This has two nice consequences that can be seen in the wms-image.js and mapbuide-untiled.js examples: * no images are requested when you browse outside of the layer extent * when the layer extent is within the viewport extent, cached images are used since the intersecting extent is the same for multiple viewport extents
This commit is contained in:
@@ -11,11 +11,11 @@ var layers = [
|
||||
source: new ol.source.MapQuest({layer: 'sat'})
|
||||
}),
|
||||
new ol.layer.Image({
|
||||
extent: [-13884991, 2870341, -7455066, 6338219],
|
||||
source: new ol.source.ImageWMS({
|
||||
url: 'http://demo.opengeo.org/geoserver/wms',
|
||||
params: {'LAYERS': 'topp:states'},
|
||||
serverType: 'geoserver',
|
||||
extent: [-13884991, 2870341, -7455066, 6338219]
|
||||
serverType: 'geoserver'
|
||||
})
|
||||
})
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user