geowebcache проблема с отображением слоем
Добавлено: 22 дек 2010, 21:36
не могу настроить кэширование, наверное из-за такой проблемы
это ссылка на рабочий кусочек который скапирован с демо
а это geowebcache.xml
а это файл настройки кэша
не могу найти ошибку
на демо отображается http://localhost:8080/geowebcache/demo/ ... =image/png400: Requested horizontal resolution: 0.0042968750000000056 , best match: 0.0054931640625 exceeds 10% threshold. Perhaps the client is configured with an incorrect set of scales (resolutions), or the DPI setting is off compared to the one in GWC ?
это ссылка на рабочий кусочек который скапирован с демо
а это с вебстранице где должен отображаться этот кусочек
я не могу понять, почему не отображается
Спойлер
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Интеграция геоинформационных ресурсов Госкомимущества</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="http://localhost/openlayers/OpenLayers.js"></script>
<script src="ol-search.js"></script>
</head>
<body onLoad="init()">
<div id="top"><b>Интеграция геоинформационных ресурсов Госкомимущества на основе геосервисов</b>: используйте мышку для перетаскивания и увеличения/уменьшения изображения
<div id="sc">
<script language="JavaScript">
function pi(str) {
tmp = parent.form1.textk.value;
parent.form1.textk.value = tmp + str;
}
</script>
<!-- end контент-->
</div>
Щелкните на карту и просмотрите атрибуты слоя
<select name="layerChoice" id="layerChoice" onchange="chooseLayer()"><option value="none" selected="selected">выберите слой...</option><option value="veg_pol_2">Растительность (навигационная карта)</option><option value="hydro_pol_2">Гидрография (навигационная карта)</option><option value="settle_pol">Населенные пункты (навигационная карта)</option><option value="roads_lin">Дороги (навигационная карта)</option><option value="zis_lands">Земельная информационная система</option><option value="lots">Земельные участки (ЕГРНИ)</option></select> в правом окне страницы
</div>
<div id="glavn"><a href="http://localhost/geo/geoportal.html" class="gl">Главная страница</a>
</div>
<br>
<div id="sr">тут будет поиск
<form name='form_sr'>
<input type='text' name='name' size='20' maxlength='16' value=''>
<input type="button" value="Search" onclick="getext()">
</form>
</div>
<div id="content">
<div id="map"></div>
<iframe id="queryresults">
</iframe>
<script type="text/javascript">
function init(){
bounds = new OpenLayers.Bounds(26.4,55.2,27.5,55.9);
var map = new OpenLayers.Map( 'map', {maxExtent: bounds, projection:"EPSG:4326", minScale: 35000, units: "km" } );
borders = new OpenLayers.Layer.WMS("Граница района", "http://localhost:8080/geowebcache/service/wms",
{layers: "borders"}
);
veg_pol_2 = new OpenLayers.Layer.WMS("Растительность (навигационная карта)", "http://localhost:8080/geowebcache/service/wms",
{layers: "wms_veg_pol_2",
transparent: "true", format: "image/png"}
);
hydro_pol_2 = new OpenLayers.Layer.WMS("Гидрография (навигационная карта)", "http://localhost:8080/geowebcache/service/wms",
{layers: "wms_hydro_pol_2",
transparent: "true", format: "image/png"}
);
settle_pol = new OpenLayers.Layer.WMS("Населенные пункты (навигационная карта)", "http://localhost/cgi-bin/mapserv.exe?ma ... sion=1.1.0",
{layers: "wms_settle_pol",
transparent: "true", format: "image/png"}
);
roads_lin = new OpenLayers.Layer.WMS("Дороги (навигационная карта)", "http://localhost:8080/geowebcache/service/wms&",
{layers: "wms_roads_lin",
transparent: "true", format: "image/png"}
);
zis_lands = new OpenLayers.Layer.WMS("Земельная информационная система", "http://localhost:8080/geowebcache/service/wms&",
{layers: "wms_land_br",
transparent: "true", format: "image/png"}
);
lots = new OpenLayers.Layer.WMS("Земельные участки (ЕГРНИ)", "http://localhost/cgi-bin/mapserv.exe?ma ... s_zis1.map&",
{layers: "wms_lots",
transparent: "true", format: "image/png"}
);
map.addLayers([borders, veg_pol_2, settle_pol, hydro_pol_2, roads_lin, zis_lands, lots]);
veg_pol_2.setVisibility(false);
hydro_pol_2.setVisibility(false);
roads_lin.setVisibility(false);
settle_pol.setVisibility(false);
zis_lands.setVisibility(false);
lots.setVisibility(false);
map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':true}));
var ls = map.getControlsByClass('OpenLayers.Control.LayerSwitcher')[0];
ls.maximizeControl();
/* sel = new OpenLayers.Layer.WMS("Selected", "http://gis-lab.info/cgi-bin/mapserv?",(map:"/usr/local/www/gis-lab/data/programs/mapserver/ol-search/layer.map",
layers: 'selected',sql:"select * from settlements where name='-1'",transparent:"true"},{singleTile:true});
geosample = new OpenLayers.Layer.WMS(
"Selected",
"http://niczem.zapto.org/cgi-bin/mapserv ... raslav.map"
{layers:"veg_pol_2,geosample:roads_lin,settle_pol",transparent:"false"});
map.addLayers([geosample,sel]);
var bounds = new OpenLayers.Bounds.fromString('26.4,55.2,27.5,55.9');
map.zoomToExtent(bounds);
function init_AJAX() {
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} //IE
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
try { return new XMLHttpRequest(); } catch(e) {} //Native Javascript
alert("XMLHttpRequest not supported");
return null;
};*/
/*function getext() {
var req = init_AJAX();
req.open("GET", "http://niczem.zapto.org/geo/ol-search-g ... ame.value));
req.onreadystatechange = function () {
if (req.readyState==4) {
if (req.status==200) {
var response = req.responseText.split("|");
sel.mergeNewParams({sql:response[0]});
var bounds = new OpenLayers.Bounds.fromString(response[1]);
map.zoomToExtent(bounds);
}
}
};
req.send(null);
}
*/
map.addControl(new OpenLayers.Control.KeyboardDefaults());
map.zoomToMaxExtent();
queryLayer = null;
map.events.register("click", map, queryResults); // map.events.register
} //function init()
function queryResults(evt) {
var cXY = evt.xy;
var cLL = this.getLonLatFromPixel(cXY);
//alert(cXY.x + "," + cXY.y + " = " + cLL.lon + "," + cLL.lat );
if (queryLayer != null) {
var url = queryLayer.getFullRequestString({
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "text/html",
BBOX: queryLayer.map.getExtent().toBBOX(),
X: evt.xy.x,
Y: evt.xy.y,
INFO_FORMAT: "text/plain",
QUERY_LAYERS: queryLayer.params.LAYERS,
WIDTH: queryLayer.map.size.w,
HEIGHT: queryLayer.map.size.h}
);
var resultsDiv = document.getElementById("queryresults");
resultsDiv.src = url;
Event.stop(evt); //prevent 'bubbling up' of event...
} // if not null
} // function(evt)
function chooseLayer() {
queryLayername = document.getElementById("layerChoice").value;
if (queryLayername == "none") {queryLayer = null};
if (queryLayername == "veg_pol_2") {queryLayer = veg_pol_2};
if (queryLayername == "settle_pol") {queryLayer = settle_pol};
if (queryLayername == "hydro_pol_2") {queryLayer = hydro_pol_2};
if (queryLayername == "roads_lin") {queryLayer = roads_lin};
if (queryLayername == "lots") {queryLayer = lots};
if (queryLayername == "zis_lands") {queryLayer = zis_lands};}
</script>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Интеграция геоинформационных ресурсов Госкомимущества</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="http://localhost/openlayers/OpenLayers.js"></script>
<script src="ol-search.js"></script>
</head>
<body onLoad="init()">
<div id="top"><b>Интеграция геоинформационных ресурсов Госкомимущества на основе геосервисов</b>: используйте мышку для перетаскивания и увеличения/уменьшения изображения
<div id="sc">
<script language="JavaScript">
function pi(str) {
tmp = parent.form1.textk.value;
parent.form1.textk.value = tmp + str;
}
</script>
<!-- end контент-->
</div>
Щелкните на карту и просмотрите атрибуты слоя
<select name="layerChoice" id="layerChoice" onchange="chooseLayer()"><option value="none" selected="selected">выберите слой...</option><option value="veg_pol_2">Растительность (навигационная карта)</option><option value="hydro_pol_2">Гидрография (навигационная карта)</option><option value="settle_pol">Населенные пункты (навигационная карта)</option><option value="roads_lin">Дороги (навигационная карта)</option><option value="zis_lands">Земельная информационная система</option><option value="lots">Земельные участки (ЕГРНИ)</option></select> в правом окне страницы
</div>
<div id="glavn"><a href="http://localhost/geo/geoportal.html" class="gl">Главная страница</a>
</div>
<br>
<div id="sr">тут будет поиск
<form name='form_sr'>
<input type='text' name='name' size='20' maxlength='16' value=''>
<input type="button" value="Search" onclick="getext()">
</form>
</div>
<div id="content">
<div id="map"></div>
<iframe id="queryresults">
</iframe>
<script type="text/javascript">
function init(){
bounds = new OpenLayers.Bounds(26.4,55.2,27.5,55.9);
var map = new OpenLayers.Map( 'map', {maxExtent: bounds, projection:"EPSG:4326", minScale: 35000, units: "km" } );
borders = new OpenLayers.Layer.WMS("Граница района", "http://localhost:8080/geowebcache/service/wms",
{layers: "borders"}
);
veg_pol_2 = new OpenLayers.Layer.WMS("Растительность (навигационная карта)", "http://localhost:8080/geowebcache/service/wms",
{layers: "wms_veg_pol_2",
transparent: "true", format: "image/png"}
);
hydro_pol_2 = new OpenLayers.Layer.WMS("Гидрография (навигационная карта)", "http://localhost:8080/geowebcache/service/wms",
{layers: "wms_hydro_pol_2",
transparent: "true", format: "image/png"}
);
settle_pol = new OpenLayers.Layer.WMS("Населенные пункты (навигационная карта)", "http://localhost/cgi-bin/mapserv.exe?ma ... sion=1.1.0",
{layers: "wms_settle_pol",
transparent: "true", format: "image/png"}
);
roads_lin = new OpenLayers.Layer.WMS("Дороги (навигационная карта)", "http://localhost:8080/geowebcache/service/wms&",
{layers: "wms_roads_lin",
transparent: "true", format: "image/png"}
);
zis_lands = new OpenLayers.Layer.WMS("Земельная информационная система", "http://localhost:8080/geowebcache/service/wms&",
{layers: "wms_land_br",
transparent: "true", format: "image/png"}
);
lots = new OpenLayers.Layer.WMS("Земельные участки (ЕГРНИ)", "http://localhost/cgi-bin/mapserv.exe?ma ... s_zis1.map&",
{layers: "wms_lots",
transparent: "true", format: "image/png"}
);
map.addLayers([borders, veg_pol_2, settle_pol, hydro_pol_2, roads_lin, zis_lands, lots]);
veg_pol_2.setVisibility(false);
hydro_pol_2.setVisibility(false);
roads_lin.setVisibility(false);
settle_pol.setVisibility(false);
zis_lands.setVisibility(false);
lots.setVisibility(false);
map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':true}));
var ls = map.getControlsByClass('OpenLayers.Control.LayerSwitcher')[0];
ls.maximizeControl();
/* sel = new OpenLayers.Layer.WMS("Selected", "http://gis-lab.info/cgi-bin/mapserv?",(map:"/usr/local/www/gis-lab/data/programs/mapserver/ol-search/layer.map",
layers: 'selected',sql:"select * from settlements where name='-1'",transparent:"true"},{singleTile:true});
geosample = new OpenLayers.Layer.WMS(
"Selected",
"http://niczem.zapto.org/cgi-bin/mapserv ... raslav.map"
{layers:"veg_pol_2,geosample:roads_lin,settle_pol",transparent:"false"});
map.addLayers([geosample,sel]);
var bounds = new OpenLayers.Bounds.fromString('26.4,55.2,27.5,55.9');
map.zoomToExtent(bounds);
function init_AJAX() {
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} //IE
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
try { return new XMLHttpRequest(); } catch(e) {} //Native Javascript
alert("XMLHttpRequest not supported");
return null;
};*/
/*function getext() {
var req = init_AJAX();
req.open("GET", "http://niczem.zapto.org/geo/ol-search-g ... ame.value));
req.onreadystatechange = function () {
if (req.readyState==4) {
if (req.status==200) {
var response = req.responseText.split("|");
sel.mergeNewParams({sql:response[0]});
var bounds = new OpenLayers.Bounds.fromString(response[1]);
map.zoomToExtent(bounds);
}
}
};
req.send(null);
}
*/
map.addControl(new OpenLayers.Control.KeyboardDefaults());
map.zoomToMaxExtent();
queryLayer = null;
map.events.register("click", map, queryResults); // map.events.register
} //function init()
function queryResults(evt) {
var cXY = evt.xy;
var cLL = this.getLonLatFromPixel(cXY);
//alert(cXY.x + "," + cXY.y + " = " + cLL.lon + "," + cLL.lat );
if (queryLayer != null) {
var url = queryLayer.getFullRequestString({
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "text/html",
BBOX: queryLayer.map.getExtent().toBBOX(),
X: evt.xy.x,
Y: evt.xy.y,
INFO_FORMAT: "text/plain",
QUERY_LAYERS: queryLayer.params.LAYERS,
WIDTH: queryLayer.map.size.w,
HEIGHT: queryLayer.map.size.h}
);
var resultsDiv = document.getElementById("queryresults");
resultsDiv.src = url;
Event.stop(evt); //prevent 'bubbling up' of event...
} // if not null
} // function(evt)
function chooseLayer() {
queryLayername = document.getElementById("layerChoice").value;
if (queryLayername == "none") {queryLayer = null};
if (queryLayername == "veg_pol_2") {queryLayer = veg_pol_2};
if (queryLayername == "settle_pol") {queryLayer = settle_pol};
if (queryLayername == "hydro_pol_2") {queryLayer = hydro_pol_2};
if (queryLayername == "roads_lin") {queryLayer = roads_lin};
if (queryLayername == "lots") {queryLayer = lots};
if (queryLayername == "zis_lands") {queryLayer = zis_lands};}
</script>
</div>
</body>
</html>
Спойлер
<?xml version="1.0" encoding="utf-8"?>
<gwcConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://geowebcache.org/schema/1.2.2/geowebcache.xsd"
xmlns="http://geowebcache.org/schema/1.2.2">
<version>1.2.2</version>
<backendTimeout>120</backendTimeout>
<gridSets>
<!-- Grid Set Example,
by default EPSG:900913 and EPSG:4326 are defined -->
<gridSet>
<!-- This does not have to be an EPSG code, you can also
have multiple gridSet elements per SRS -->
<name>EPSG:2163</name>
<srs><number>2163</number></srs>
<extent>
<coords>
<double>-2495667.977678598</double>
<double>-2223677.196231552</double>
<double>3291070.6104286816</double>
<double>959189.3312465074</double>
</coords>
</extent>
<scaleDenominators>
<double>25000000</double>
<double>1000000</double>
<double>100000</double>
<double>25000</double>
</scaleDenominators>
<tileHeight>200</tileHeight>
<tileWidth>200</tileWidth>
</gridSet>
</gridSets>
<layers>
<wmsLayer>
<name>topp:states</name>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:2163</gridSetName>
</gridSubset>
</gridSubsets>
<wmsUrl><string>http://atlas.openplans.org:8080/geoserv ... g></wmsUrl>
</wmsLayer>
<wmsLayer>
<name>raster test layer</name>
<mimeFormats><string>image/jpeg</string></mimeFormats>
<wmsUrl><string>http://atlas.openplans.org:8080/geoserv ... g></wmsUrl>
<wmsLayers>nurc:Img_Sample</wmsLayers>
</wmsLayer>
<wmsLayer>
<name>img states</name>
<metaInformation>
<title>Nicer title for Image States</title>
<description>This is a description. Fascinating.</description>
</metaInformation>
<mimeFormats><string>image/gif</string></mimeFormats>
<!-- Grid Subset Example -->
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>-129.6</double>
<double>3.45</double>
<double>-62.1</double>
<double>70.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://atlas.openplans.org:8080/geoserver/wms</string>
</wmsUrl>
<wmsLayers>nurc:Img_Sample,topp:states</wmsLayers>
<transparent>false</transparent>
<bgColor>0x0066FF</bgColor>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_borders</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>borders</wmsLayers>
<!--<transparent>true</transparent>-->
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_hydro_pol_2</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>hydro_pol_2</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_veg_pol_2</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>veg_pol_2</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_settle_pol</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>settle_pol</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_roads_lin</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>roads_lin</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_lots</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>lots</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_land_br</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>land_br</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
</layers>
</gwcConfiguration>
<gwcConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://geowebcache.org/schema/1.2.2/geowebcache.xsd"
xmlns="http://geowebcache.org/schema/1.2.2">
<version>1.2.2</version>
<backendTimeout>120</backendTimeout>
<gridSets>
<!-- Grid Set Example,
by default EPSG:900913 and EPSG:4326 are defined -->
<gridSet>
<!-- This does not have to be an EPSG code, you can also
have multiple gridSet elements per SRS -->
<name>EPSG:2163</name>
<srs><number>2163</number></srs>
<extent>
<coords>
<double>-2495667.977678598</double>
<double>-2223677.196231552</double>
<double>3291070.6104286816</double>
<double>959189.3312465074</double>
</coords>
</extent>
<scaleDenominators>
<double>25000000</double>
<double>1000000</double>
<double>100000</double>
<double>25000</double>
</scaleDenominators>
<tileHeight>200</tileHeight>
<tileWidth>200</tileWidth>
</gridSet>
</gridSets>
<layers>
<wmsLayer>
<name>topp:states</name>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:2163</gridSetName>
</gridSubset>
</gridSubsets>
<wmsUrl><string>http://atlas.openplans.org:8080/geoserv ... g></wmsUrl>
</wmsLayer>
<wmsLayer>
<name>raster test layer</name>
<mimeFormats><string>image/jpeg</string></mimeFormats>
<wmsUrl><string>http://atlas.openplans.org:8080/geoserv ... g></wmsUrl>
<wmsLayers>nurc:Img_Sample</wmsLayers>
</wmsLayer>
<wmsLayer>
<name>img states</name>
<metaInformation>
<title>Nicer title for Image States</title>
<description>This is a description. Fascinating.</description>
</metaInformation>
<mimeFormats><string>image/gif</string></mimeFormats>
<!-- Grid Subset Example -->
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>-129.6</double>
<double>3.45</double>
<double>-62.1</double>
<double>70.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://atlas.openplans.org:8080/geoserver/wms</string>
</wmsUrl>
<wmsLayers>nurc:Img_Sample,topp:states</wmsLayers>
<transparent>false</transparent>
<bgColor>0x0066FF</bgColor>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_borders</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>borders</wmsLayers>
<!--<transparent>true</transparent>-->
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_hydro_pol_2</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>hydro_pol_2</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_veg_pol_2</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>veg_pol_2</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_settle_pol</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>settle_pol</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_roads_lin</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>roads_lin</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_lots</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>lots</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
<wmsLayer>
<name>wms_land_br</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<gridSubsets>
<gridSubset>
<gridSetName>EPSG:4326</gridSetName>
<extent>
<coords>
<double>26.4</double>
<double>55.2</double>
<double>27.5</double>
<double>55.9</double>
</coords>
</extent>
</gridSubset>
</gridSubsets>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?ma ... p&</string>
</wmsUrl>
<wmsLayers>land_br</wmsLayers>
<transparent>true</transparent>
<expireCacheList>
<expirationRule minZoom="0" expiration="60" />
</expireCacheList>
<expireClientsList>
<expirationRule minZoom="0" expiration="500" />
</expireClientsList>
</wmsLayer>
</layers>
</gwcConfiguration>
Спойлер
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="gwcAppCtx" class="org.geowebcache.util.ApplicationContextProvider" />
<!-- The location of a static configuration file for GeoWebCache.
By default this lives in WEB-INF/classes/geowebcache.xml -->
<bean id="gwcXmlConfig" class="org.geowebcache.config.XMLConfiguration">
<constructor-arg ref="gwcAppCtx" />
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcDefaultStorageFinder" />
<!-- Other examples: -->
<!--property name="relativePath"><value>../resources</value></property -->
<!--property name="relativePath"><value>/WEB-INF/classes</value></property-->
<!--property name="absolutePath"><value>/etc/geowebcache/conf</value></property-->
</bean>
<!-- If you like to automatically configure GWC from a WMS Getcapabilities document,
change the values below. The last constructor-arg lets you specify parameters
that are appended to every WMS request to the backed, for example:
"format_options=regionate_by:auto&bgcolor=0x112233" -->
<bean id="gwcWMSConfig" class="org.geowebcache.config.GetCapabilitiesConfiguration">
<constructor-arg ref="gwcGridSetBroker"/>
<!-- The URL to the WMS GetCapabilities document -->
<constructor-arg value="http://localhost:8080/geowebcache/wms"/>
<!-- The formats to support for all layers read for the above document -->
<constructor-arg value="image/png,image/jpeg"/>
<!-- Metatiling factors, 3x3 is usually a good compromise for vector data -->
<constructor-arg value="3x3"/>
<!-- Vendor parameters, these are appended to every request sent to the backend.
If you use MapServer you probably want to set this to "map=name" -->
<constructor-arg value="map=name"/>
<!-- Whether to allow cached=false to specificed for certain requests -->
<constructor-arg value="false"/>
</bean>
<!-- For each configuration bean above, add them below to activate -->
<bean id="gwcTLDispatcher" class="org.geowebcache.layer.TileLayerDispatcher">
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg>
<list>
<ref bean="gwcWMSConfig" />
<ref bean="gwcXmlConfig" />
</list>
</constructor-arg>
</bean>
<bean id="gwcDefaultStorageFinder" class="org.geowebcache.storage.DefaultStorageFinder">
<constructor-arg ref="gwcAppCtx" />
</bean>
<bean id="gwcMetaStore" class="org.geowebcache.storage.metastore.jdbc.JDBCMetaBackend" destroy-method="destroy">
<constructor-arg ref="gwcDefaultStorageFinder" />
</bean>
<!-- Static definition of where to put the metastore.
Note that the directory is AUTOMATICALLY CREATED if it does not exist. -->
<!-- bean id="gwcMetaStore" class="org.geowebcache.storage.metastore.jdbc.JDBCMetaBackend" destroy-method="destroy">
<constructor-arg value="org.h2.Driver" />
<constructor-arg value="jdbc:h2:file:/tmp/gwc_metastore/h2_metastore;TRACE_LEVEL_FILE=0" />
<constructor-arg value="username" />
<constructor-arg value="password" />
</bean -->
<bean id="gwcBlobStore" class="org.geowebcache.storage.blobstore.file.FileBlobStore" destroy-method="destroy">
<constructor-arg ref="gwcDefaultStorageFinder" />
</bean>
<!-- Static definition of where to put the blobstore.
Note that the directory MUST EXIST when GWC is started. -->
<!-- bean id="gwcBlobStore" class="org.geowebcache.storage.blobstore.file.FileBlobStore" destroy-method="destroy">
<constructor-arg value="/tmp/gwc_blobstore" />
</bean -->
<bean id="gwcStorageBroker" class="org.geowebcache.storage.StorageBroker" destroy-method="destroy">
<constructor-arg ref="gwcMetaStore" />
<constructor-arg ref="gwcBlobStore" />
<property name="verifyFileSize" value="TRUE"/>
</bean>
<bean id="gwcGridSetBroker" class="org.geowebcache.grid.GridSetBroker">
<!-- Should we used EPSG:900913 instead of EPSG:3857 ? -->
<constructor-arg type="boolean" value="TRUE" />
<!--
Should the default grids be named EPSG:4326 and EPSG:900913 (TRUE),
or (FALSE) use the new names similar to what WMTS suggests,
GlobalCRS84Geometric and GoogleMapsCompatible ?
If you say FALSE here, you have to manually
rename the directories and entries in the H2 database.
-->
<constructor-arg type="boolean" value="TRUE" />
</bean>
<bean id="gwcRuntimeStats" class="org.geowebcache.stats.RuntimeStats" destroy-method="destroy">
<!-- The poll interval, the number of seconds until counters are aggregated -->
<constructor-arg type="int" value="3" />
<!-- The intervals (in seconds) for which aggregates are reported.
Each interval must be a multiple of the poll interval above and
listed in ascending order. For example, for a maximum interval
of 60 seconds and 3 second poll interval from above, the amount
of memory consumed is (60 / 3) * 8 = 160 bytes
-->
<constructor-arg>
<list>
<value>3</value>
<value>15</value>
<value>60</value>
</list>
</constructor-arg>
<!-- Descriptive texts for each of the intervals above -->
<constructor-arg>
<list>
<value>3 seconds</value>
<value>15 seconds</value>
<value>60 seconds</value>
</list>
</constructor-arg>
</bean>
<!-- controller for handling all incoming requests -->
<bean id="geowebcacheDispatcher" class="org.geowebcache.GeoWebCacheDispatcher" destroy-method="destroy">
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcXmlConfig"/>
<constructor-arg ref="gwcRuntimeStats"/>
<property name="defaultStorageFinder" ref="gwcDefaultStorageFinder"/>
</bean>
<!-- WMS based services -->
<bean id="gwcServiceWMS"
class="org.geowebcache.service.wms.WMSService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcRuntimeStats"/>
<!-- Set the next line to true to enable full WMS support,
i.e. recombining tiles to serve arbitrary WMS requests -->
<property name="fullWMS"><value>FALSE</value></property>
<!-- Proxy unknown requests -->
<property name="proxyRequests"><value>TRUE</value></property>
</bean>
<bean id="gwcServiceGMaps"
class="org.geowebcache.service.gmaps.GMapsConverter">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
</bean>
<bean id="gwcServiceMGMaps"
class="org.geowebcache.service.mgmaps.MGMapsConverter">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
</bean>
<bean id="gwcServiceVE"
class="org.geowebcache.service.ve.VEConverter">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
</bean>
<bean id="gwcServiceKML"
class="org.geowebcache.service.kml.KMLService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcRuntimeStats"/>
</bean>
<bean id="gwcServiceTMS"
class="org.geowebcache.service.tms.TMSService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcRuntimeStats"/>
<!-- Optionally you can set the base URL for the service -->
<!-- <property name="baseURL" value="http://localhost:8080/geowebcache" /> -->
</bean>
<bean id="gwcServiceWMTS"
class="org.geowebcache.service.wmts.WMTSService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcRuntimeStats"/>
</bean>
<!-- WFS based services -->
<bean id="gwcServiceWFS"
class="org.geowebcache.service.wfs.WFSService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg value="http://localhost:8080/geoserver/wfs" />
<constructor-arg value="" />
<constructor-arg value="600" />
</bean>
<!-- Thread pool for seeding -->
<bean id="gwcSeederThreadPoolExec"
class="org.geowebcache.rest.seed.SeederThreadPoolExecutor">
<constructor-arg value="16"/><!-- Size of core pool -->
<constructor-arg value="32"/><!-- Maximum size of pool -->
</bean>
<!-- GeoRSS feeds poller for georss update sources on layers
Uncomment the bean to enable it
The third argument is the number of seconds to delay before starting up.
Useful if you depend on other servlets running in the same container.
-->
<!--
<bean id="gwcGeoRSSPoller" class="org.geowebcache.georss.GeoRSSPoller" destroy-method="destroy">
<constructor-arg ref="gwcTLDispatcher" />
<constructor-arg ref="gwcSeedRestlet"/>
<constructor-arg value="10" />
</bean>-->
<!-- Restlets -->
<bean id="gwcSeedRestlet" class="org.geowebcache.rest.seed.SeedRestlet">
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
<property name="threadPoolExecutor" ref="gwcSeederThreadPoolExec"/>
<property name="storageBroker" ref="gwcStorageBroker"/>
</bean>
<bean id="gwcSeedFormRestlet" class="org.geowebcache.rest.seed.SeedFormRestlet">
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
<property name="threadPoolExecutor" ref="gwcSeederThreadPoolExec"/>
<property name="storageBroker" ref="gwcStorageBroker"/>
<property name="seedRestlet" ref="gwcSeedRestlet"/>
</bean>
<bean id="gwcReloadRestlet" class="org.geowebcache.rest.reload.ReloadRestlet">
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
</bean>
<bean id="gwcTileLayerRestlet" class="org.geowebcache.rest.layers.TileLayerRestlet">
<property name="XMLConfiguration" ref="gwcXmlConfig"/>
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
</bean>
<bean id="gwcBoundsRestlet" class="org.geowebcache.rest.bounds.BoundsRestlet">
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
</bean>
<bean id="gwcFilterUpdateRestlet" class="org.geowebcache.rest.filter.FilterUpdateRestlet">
<constructor-arg ref="gwcTLDispatcher"/>
</bean>
<bean id="gwcByteStreamerRestlet" class="org.geowebcache.rest.webresources.ByteStreamerRestlet" />
<!-- REST Dispatcher -->
<bean id="gwcRestDispatcher" class="org.geowebcache.rest.RESTDispatcher">
<constructor-arg type="java.util.Map">
<map>
<entry>
<key><value>/seed/{layer}.{extension}</value></key>
<ref bean="gwcSeedRestlet" />
</entry>
<entry>
<key><value>/seed/{layer}</value></key>
<ref bean="gwcSeedFormRestlet" />
</entry>
<entry>
<key><value>/reload</value></key>
<ref bean="gwcReloadRestlet" />
</entry>
<entry>
<key><value>/layers/{layer}.{extension}</value></key>
<ref bean="gwcTileLayerRestlet" />
</entry>
<entry>
<key><value>/bounds/{layer}/{srs}/{type}</value></key>
<ref bean="gwcBoundsRestlet" />
</entry>
<entry>
<key><value>/filter/{filterName}/update/{updateType}</value></key>
<ref bean="gwcFilterUpdateRestlet" />
</entry>
<entry>
<key><value>/web/{filename}</value></key>
<ref bean="gwcByteStreamerRestlet" />
</entry>
</map>
</constructor-arg>
</bean>
<bean id="gwcProxyDispatcher"
class="org.geowebcache.proxy.ProxyDispatcher"/>
<bean id="gwcUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="alwaysUseFullPath" value="true"/>
<property name="mappings">
<props>
<prop key="/rest/**">gwcRestDispatcher</prop>
<prop key="/service/**">geowebcacheDispatcher</prop>
<prop key="/demo/**">geowebcacheDispatcher</prop>
<prop key="/proxy/**">gwcProxyDispatcher</prop>
<prop key="/home">geowebcacheDispatcher</prop>
</props>
</property>
</bean>
</beans>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="gwcAppCtx" class="org.geowebcache.util.ApplicationContextProvider" />
<!-- The location of a static configuration file for GeoWebCache.
By default this lives in WEB-INF/classes/geowebcache.xml -->
<bean id="gwcXmlConfig" class="org.geowebcache.config.XMLConfiguration">
<constructor-arg ref="gwcAppCtx" />
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcDefaultStorageFinder" />
<!-- Other examples: -->
<!--property name="relativePath"><value>../resources</value></property -->
<!--property name="relativePath"><value>/WEB-INF/classes</value></property-->
<!--property name="absolutePath"><value>/etc/geowebcache/conf</value></property-->
</bean>
<!-- If you like to automatically configure GWC from a WMS Getcapabilities document,
change the values below. The last constructor-arg lets you specify parameters
that are appended to every WMS request to the backed, for example:
"format_options=regionate_by:auto&bgcolor=0x112233" -->
<bean id="gwcWMSConfig" class="org.geowebcache.config.GetCapabilitiesConfiguration">
<constructor-arg ref="gwcGridSetBroker"/>
<!-- The URL to the WMS GetCapabilities document -->
<constructor-arg value="http://localhost:8080/geowebcache/wms"/>
<!-- The formats to support for all layers read for the above document -->
<constructor-arg value="image/png,image/jpeg"/>
<!-- Metatiling factors, 3x3 is usually a good compromise for vector data -->
<constructor-arg value="3x3"/>
<!-- Vendor parameters, these are appended to every request sent to the backend.
If you use MapServer you probably want to set this to "map=name" -->
<constructor-arg value="map=name"/>
<!-- Whether to allow cached=false to specificed for certain requests -->
<constructor-arg value="false"/>
</bean>
<!-- For each configuration bean above, add them below to activate -->
<bean id="gwcTLDispatcher" class="org.geowebcache.layer.TileLayerDispatcher">
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg>
<list>
<ref bean="gwcWMSConfig" />
<ref bean="gwcXmlConfig" />
</list>
</constructor-arg>
</bean>
<bean id="gwcDefaultStorageFinder" class="org.geowebcache.storage.DefaultStorageFinder">
<constructor-arg ref="gwcAppCtx" />
</bean>
<bean id="gwcMetaStore" class="org.geowebcache.storage.metastore.jdbc.JDBCMetaBackend" destroy-method="destroy">
<constructor-arg ref="gwcDefaultStorageFinder" />
</bean>
<!-- Static definition of where to put the metastore.
Note that the directory is AUTOMATICALLY CREATED if it does not exist. -->
<!-- bean id="gwcMetaStore" class="org.geowebcache.storage.metastore.jdbc.JDBCMetaBackend" destroy-method="destroy">
<constructor-arg value="org.h2.Driver" />
<constructor-arg value="jdbc:h2:file:/tmp/gwc_metastore/h2_metastore;TRACE_LEVEL_FILE=0" />
<constructor-arg value="username" />
<constructor-arg value="password" />
</bean -->
<bean id="gwcBlobStore" class="org.geowebcache.storage.blobstore.file.FileBlobStore" destroy-method="destroy">
<constructor-arg ref="gwcDefaultStorageFinder" />
</bean>
<!-- Static definition of where to put the blobstore.
Note that the directory MUST EXIST when GWC is started. -->
<!-- bean id="gwcBlobStore" class="org.geowebcache.storage.blobstore.file.FileBlobStore" destroy-method="destroy">
<constructor-arg value="/tmp/gwc_blobstore" />
</bean -->
<bean id="gwcStorageBroker" class="org.geowebcache.storage.StorageBroker" destroy-method="destroy">
<constructor-arg ref="gwcMetaStore" />
<constructor-arg ref="gwcBlobStore" />
<property name="verifyFileSize" value="TRUE"/>
</bean>
<bean id="gwcGridSetBroker" class="org.geowebcache.grid.GridSetBroker">
<!-- Should we used EPSG:900913 instead of EPSG:3857 ? -->
<constructor-arg type="boolean" value="TRUE" />
<!--
Should the default grids be named EPSG:4326 and EPSG:900913 (TRUE),
or (FALSE) use the new names similar to what WMTS suggests,
GlobalCRS84Geometric and GoogleMapsCompatible ?
If you say FALSE here, you have to manually
rename the directories and entries in the H2 database.
-->
<constructor-arg type="boolean" value="TRUE" />
</bean>
<bean id="gwcRuntimeStats" class="org.geowebcache.stats.RuntimeStats" destroy-method="destroy">
<!-- The poll interval, the number of seconds until counters are aggregated -->
<constructor-arg type="int" value="3" />
<!-- The intervals (in seconds) for which aggregates are reported.
Each interval must be a multiple of the poll interval above and
listed in ascending order. For example, for a maximum interval
of 60 seconds and 3 second poll interval from above, the amount
of memory consumed is (60 / 3) * 8 = 160 bytes
-->
<constructor-arg>
<list>
<value>3</value>
<value>15</value>
<value>60</value>
</list>
</constructor-arg>
<!-- Descriptive texts for each of the intervals above -->
<constructor-arg>
<list>
<value>3 seconds</value>
<value>15 seconds</value>
<value>60 seconds</value>
</list>
</constructor-arg>
</bean>
<!-- controller for handling all incoming requests -->
<bean id="geowebcacheDispatcher" class="org.geowebcache.GeoWebCacheDispatcher" destroy-method="destroy">
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcXmlConfig"/>
<constructor-arg ref="gwcRuntimeStats"/>
<property name="defaultStorageFinder" ref="gwcDefaultStorageFinder"/>
</bean>
<!-- WMS based services -->
<bean id="gwcServiceWMS"
class="org.geowebcache.service.wms.WMSService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcRuntimeStats"/>
<!-- Set the next line to true to enable full WMS support,
i.e. recombining tiles to serve arbitrary WMS requests -->
<property name="fullWMS"><value>FALSE</value></property>
<!-- Proxy unknown requests -->
<property name="proxyRequests"><value>TRUE</value></property>
</bean>
<bean id="gwcServiceGMaps"
class="org.geowebcache.service.gmaps.GMapsConverter">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
</bean>
<bean id="gwcServiceMGMaps"
class="org.geowebcache.service.mgmaps.MGMapsConverter">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
</bean>
<bean id="gwcServiceVE"
class="org.geowebcache.service.ve.VEConverter">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
</bean>
<bean id="gwcServiceKML"
class="org.geowebcache.service.kml.KMLService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcRuntimeStats"/>
</bean>
<bean id="gwcServiceTMS"
class="org.geowebcache.service.tms.TMSService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcRuntimeStats"/>
<!-- Optionally you can set the base URL for the service -->
<!-- <property name="baseURL" value="http://localhost:8080/geowebcache" /> -->
</bean>
<bean id="gwcServiceWMTS"
class="org.geowebcache.service.wmts.WMTSService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg ref="gwcTLDispatcher"/>
<constructor-arg ref="gwcGridSetBroker"/>
<constructor-arg ref="gwcRuntimeStats"/>
</bean>
<!-- WFS based services -->
<bean id="gwcServiceWFS"
class="org.geowebcache.service.wfs.WFSService">
<constructor-arg ref="gwcStorageBroker"/>
<constructor-arg value="http://localhost:8080/geoserver/wfs" />
<constructor-arg value="" />
<constructor-arg value="600" />
</bean>
<!-- Thread pool for seeding -->
<bean id="gwcSeederThreadPoolExec"
class="org.geowebcache.rest.seed.SeederThreadPoolExecutor">
<constructor-arg value="16"/><!-- Size of core pool -->
<constructor-arg value="32"/><!-- Maximum size of pool -->
</bean>
<!-- GeoRSS feeds poller for georss update sources on layers
Uncomment the bean to enable it
The third argument is the number of seconds to delay before starting up.
Useful if you depend on other servlets running in the same container.
-->
<!--
<bean id="gwcGeoRSSPoller" class="org.geowebcache.georss.GeoRSSPoller" destroy-method="destroy">
<constructor-arg ref="gwcTLDispatcher" />
<constructor-arg ref="gwcSeedRestlet"/>
<constructor-arg value="10" />
</bean>-->
<!-- Restlets -->
<bean id="gwcSeedRestlet" class="org.geowebcache.rest.seed.SeedRestlet">
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
<property name="threadPoolExecutor" ref="gwcSeederThreadPoolExec"/>
<property name="storageBroker" ref="gwcStorageBroker"/>
</bean>
<bean id="gwcSeedFormRestlet" class="org.geowebcache.rest.seed.SeedFormRestlet">
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
<property name="threadPoolExecutor" ref="gwcSeederThreadPoolExec"/>
<property name="storageBroker" ref="gwcStorageBroker"/>
<property name="seedRestlet" ref="gwcSeedRestlet"/>
</bean>
<bean id="gwcReloadRestlet" class="org.geowebcache.rest.reload.ReloadRestlet">
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
</bean>
<bean id="gwcTileLayerRestlet" class="org.geowebcache.rest.layers.TileLayerRestlet">
<property name="XMLConfiguration" ref="gwcXmlConfig"/>
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
</bean>
<bean id="gwcBoundsRestlet" class="org.geowebcache.rest.bounds.BoundsRestlet">
<property name="tileLayerDispatcher" ref="gwcTLDispatcher"/>
</bean>
<bean id="gwcFilterUpdateRestlet" class="org.geowebcache.rest.filter.FilterUpdateRestlet">
<constructor-arg ref="gwcTLDispatcher"/>
</bean>
<bean id="gwcByteStreamerRestlet" class="org.geowebcache.rest.webresources.ByteStreamerRestlet" />
<!-- REST Dispatcher -->
<bean id="gwcRestDispatcher" class="org.geowebcache.rest.RESTDispatcher">
<constructor-arg type="java.util.Map">
<map>
<entry>
<key><value>/seed/{layer}.{extension}</value></key>
<ref bean="gwcSeedRestlet" />
</entry>
<entry>
<key><value>/seed/{layer}</value></key>
<ref bean="gwcSeedFormRestlet" />
</entry>
<entry>
<key><value>/reload</value></key>
<ref bean="gwcReloadRestlet" />
</entry>
<entry>
<key><value>/layers/{layer}.{extension}</value></key>
<ref bean="gwcTileLayerRestlet" />
</entry>
<entry>
<key><value>/bounds/{layer}/{srs}/{type}</value></key>
<ref bean="gwcBoundsRestlet" />
</entry>
<entry>
<key><value>/filter/{filterName}/update/{updateType}</value></key>
<ref bean="gwcFilterUpdateRestlet" />
</entry>
<entry>
<key><value>/web/{filename}</value></key>
<ref bean="gwcByteStreamerRestlet" />
</entry>
</map>
</constructor-arg>
</bean>
<bean id="gwcProxyDispatcher"
class="org.geowebcache.proxy.ProxyDispatcher"/>
<bean id="gwcUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="alwaysUseFullPath" value="true"/>
<property name="mappings">
<props>
<prop key="/rest/**">gwcRestDispatcher</prop>
<prop key="/service/**">geowebcacheDispatcher</prop>
<prop key="/demo/**">geowebcacheDispatcher</prop>
<prop key="/proxy/**">gwcProxyDispatcher</prop>
<prop key="/home">geowebcacheDispatcher</prop>
</props>
</property>
</bean>
</beans>