Use GeoServer/GWC caching when possible
This commit is contained in:
@@ -11,7 +11,8 @@ var layers = [
|
|||||||
source: new ol.source.TileWMS({
|
source: new ol.source.TileWMS({
|
||||||
url: 'https://ahocevar.com/geoserver/wms',
|
url: 'https://ahocevar.com/geoserver/wms',
|
||||||
params: {
|
params: {
|
||||||
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR'
|
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR',
|
||||||
|
'TILED': true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ goog.require('ol.source.TileWMS');
|
|||||||
|
|
||||||
var wmsSource = new ol.source.TileWMS({
|
var wmsSource = new ol.source.TileWMS({
|
||||||
url: 'https://ahocevar.com/geoserver/wms',
|
url: 'https://ahocevar.com/geoserver/wms',
|
||||||
params: {'LAYERS': 'ne:ne'},
|
params: {'LAYERS': 'ne:ne', 'TILED': true},
|
||||||
serverType: 'geoserver',
|
serverType: 'geoserver',
|
||||||
crossOrigin: 'anonymous'
|
crossOrigin: 'anonymous'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ layers['wms4326'] = new ol.layer.Tile({
|
|||||||
url: 'https://ahocevar.com/geoserver/wms',
|
url: 'https://ahocevar.com/geoserver/wms',
|
||||||
crossOrigin: '',
|
crossOrigin: '',
|
||||||
params: {
|
params: {
|
||||||
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR'
|
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR',
|
||||||
|
'TILED': true
|
||||||
},
|
},
|
||||||
projection: 'EPSG:4326'
|
projection: 'EPSG:4326'
|
||||||
})
|
})
|
||||||
@@ -133,7 +134,7 @@ layers['states'] = new ol.layer.Tile({
|
|||||||
source: new ol.source.TileWMS({
|
source: new ol.source.TileWMS({
|
||||||
url: 'https://ahocevar.com/geoserver/wms',
|
url: 'https://ahocevar.com/geoserver/wms',
|
||||||
crossOrigin: '',
|
crossOrigin: '',
|
||||||
params: {'LAYERS': 'topp:states', 'TILED': true},
|
params: {'LAYERS': 'topp:states'},
|
||||||
serverType: 'geoserver',
|
serverType: 'geoserver',
|
||||||
tileGrid: new ol.tilegrid.TileGrid({
|
tileGrid: new ol.tilegrid.TileGrid({
|
||||||
extent: [-13884991, 2870341, -7455066, 6338219],
|
extent: [-13884991, 2870341, -7455066, 6338219],
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ var map4326 = new ol.Map({
|
|||||||
source: new ol.source.TileWMS({
|
source: new ol.source.TileWMS({
|
||||||
url: 'https://ahocevar.com/geoserver/wms',
|
url: 'https://ahocevar.com/geoserver/wms',
|
||||||
params: {
|
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({
|
source: new ol.source.TileWMS({
|
||||||
url: 'https://ahocevar.com/geoserver/wms',
|
url: 'https://ahocevar.com/geoserver/wms',
|
||||||
params: {
|
params: {
|
||||||
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR'
|
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR',
|
||||||
|
'TILED': true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user