[OpenLayers-Users] Fwd: geowebcached images
chris Wild
chrismwild at gmail.com
Wed May 27 20:38:04 EDT 2009
Hi,
Im using Geoserserver 1.7.4 and Openlayers 2.8.
Im wondering if anyone else has had problems displaying geowebcached images
in
OpenLayers.
The Mrsid images display fine as a cached images singularly but if more than
one cached image is added to the map only the first one displays. They don't
display as a combined group layer either.
Any suggestion much appreciated.
Thanks
<script defer="defer" type="text/javascript">
var map;
var untiled;
var tiled;
var pureCoverage = true;
// pink tile avoidance
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
// make OL compute scale according to WMS spec
OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;
function init(){
// if this is just a coverage or a group of them, disable a
few items,
// and default to jpeg format
format = 'image/png';
if(pureCoverage) {
document.getElementById('filterType').disabled = true;
document.getElementById('filter').disabled = true;
document.getElementById('antialiasSelector').disabled =
true;
document.getElementById('updateFilterButton').disabled =
true;
document.getElementById('resetFilterButton').disabled =
true;
document.getElementById('jpeg').selected = true;
format = "image/jpeg";
}
var bounds = new OpenLayers.Bounds(
1717600, 5632800,
1720000, 5636400
);
var options = {
controls: [],
maxExtent: bounds,
maxResolution: 14.0625,
projection: "EPSG:2193",
units: 'm'
};
map = new OpenLayers.Map('map', options);
// setup single tiled layer
one= new OpenLayers.Layer.WMS(
"topp:roto1 - Untiled", "
http://localhost:8080/geoserver/gwc/service/wms",
{
width: '417',
layers: 'topp:roto1',
styles: '',
srs: 'EPSG:2193',
height: '550',
format: format
}
);
// setup single tiled layer
two = new OpenLayers.Layer.WMS(
"topp:roto2 - Untiled", "
http://localhost:8080/geoserver/gwc/service/wms",
{
width: '417',
layers: 'topp:roto2',
styles: '',
srs: 'EPSG:2193',
height: '550',
format: format,
}
);
map.addLayers([one, two]);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090528/bf184c10/attachment.html
More information about the Users
mailing list