Решил попробовать кеширующий WSM-сервер. Установил Jetty + GWC. Прописал в нем слой.
Код: Выделить всё
<wmsLayer>
<name>le71400322009360edc00_cached</name>
<mimeFormats>
<string>image/png</string>
<string>image/jpeg</string>
</mimeFormats>
<grids>
<entry>
<srs>
<number>32646</number>
</srs>
<grid>
<srs>
<number>32646</number>
</srs>
<dataBounds>
<coords>
<double>150000</double>
<double>4300000</double>
<double>500000</double>
<double>4750000</double>
</coords>
</dataBounds>
<gridBounds>
<coords>
<double>150000</double>
<double>4300000</double>
<double>500000</double>
<double>4750000</double>
</coords>
</gridBounds>
<zoomStart>0</zoomStart>
<zoomStop>8</zoomStop>
</grid>
</entry>
</grids>
<wmsUrl>
<string>http://localhost/cgi-bin/mapserv.exe?map=C:/OSGeo4W/apps/test/mosaic.map&</string>
</wmsUrl>
<wmsLayers>le71400322009360edc00</wmsLayers>
<transparent>false</transparent>
</wmsLayer>
По ссылкам из GWC (вроде http://localhost:8080/geowebcache/demo/ ... =image/png) отображается корректно, зум быстрый и все такое.
Но! В моем простейшем html для OpenLayers тайлы при загрузке отображаются в беспорядке. Причем часть фрагментов карты (блоками по 2*3 или 3*3 корретно показывается), но такие блоки тайлов не состыкованы друг с другом.
Код: Выделить всё
<html>
<head>
<title>Mosaic</title>
<script
src="http://openlayers.org/api/OpenLayers.js"></script>
</head>
<body>
<div style="width:100%; height:100%" id="map"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map("map", {maxExtent: new OpenLayers.Bounds(150000, 4300000, 500000, 4750000), maxResolution: 156543, units: 'meters', projection: "EPSG:32646"});
var le = new OpenLayers.Layer.WMS( "le", "http://localhost:8080/geowebcache/service/wms", {layers: 'le71400322009360edc00_cached'} );
map.addLayer(le);
map.zoomToMaxExtent();
map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
</script>
</body>
</html>
Спасибо!