From 2dcecb9d59983c80a3581e2047284ae2e930e08b Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 21 Mar 2017 16:17:09 +0100 Subject: [PATCH] Use GeoServer/GWC caching when possible --- examples/epsg-4326.js | 3 ++- examples/getfeatureinfo-tile.js | 2 +- examples/reprojection.js | 5 +++-- examples/tissot.js | 6 ++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/epsg-4326.js b/examples/epsg-4326.js index 781d50946c..807f1a2fee 100644 --- a/examples/epsg-4326.js +++ b/examples/epsg-4326.js @@ -11,7 +11,8 @@ var layers = [ source: new ol.source.TileWMS({ url: 'https://ahocevar.com/geoserver/wms', params: { - 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR' + 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR', + 'TILED': true } }) }) diff --git a/examples/getfeatureinfo-tile.js b/examples/getfeatureinfo-tile.js index caeaeb6e52..f912b6b2ff 100644 --- a/examples/getfeatureinfo-tile.js +++ b/examples/getfeatureinfo-tile.js @@ -6,7 +6,7 @@ goog.require('ol.source.TileWMS'); var wmsSource = new ol.source.TileWMS({ url: 'https://ahocevar.com/geoserver/wms', - params: {'LAYERS': 'ne:ne'}, + params: {'LAYERS': 'ne:ne', 'TILED': true}, serverType: 'geoserver', crossOrigin: 'anonymous' }); diff --git a/examples/reprojection.js b/examples/reprojection.js index 115215a639..7f4422d1c3 100644 --- a/examples/reprojection.js +++ b/examples/reprojection.js @@ -72,7 +72,8 @@ layers['wms4326'] = new ol.layer.Tile({ url: 'https://ahocevar.com/geoserver/wms', crossOrigin: '', params: { - 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR' + 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR', + 'TILED': true }, projection: 'EPSG:4326' }) @@ -133,7 +134,7 @@ layers['states'] = new ol.layer.Tile({ source: new ol.source.TileWMS({ url: 'https://ahocevar.com/geoserver/wms', crossOrigin: '', - params: {'LAYERS': 'topp:states', 'TILED': true}, + params: {'LAYERS': 'topp:states'}, serverType: 'geoserver', tileGrid: new ol.tilegrid.TileGrid({ extent: [-13884991, 2870341, -7455066, 6338219], diff --git a/examples/tissot.js b/examples/tissot.js index cafa64cd33..821788169a 100644 --- a/examples/tissot.js +++ b/examples/tissot.js @@ -22,7 +22,8 @@ var map4326 = new ol.Map({ source: new ol.source.TileWMS({ url: 'https://ahocevar.com/geoserver/wms', params: { - 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR' + 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR', + 'TILED': true } }) }), @@ -42,7 +43,8 @@ var map3857 = new ol.Map({ source: new ol.source.TileWMS({ url: 'https://ahocevar.com/geoserver/wms', params: { - 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR' + 'LAYERS': 'ne:NE1_HR_LC_SR_W_DR', + 'TILED': true } }) }),