Hi there
I'm following through some resources trying to get GoogleMaps as a layer and
then using the US States overlay found in the tutorials working together.
Both parts appear now but when I am looking at the US and zoom in a little
bit, I can see large grid lines between the tiles that are sent back for the
overlay. My code is as follows:
var map;
// avoid pink tiles
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
OpenLayers.Util.onImageLoadErrorColor = "transparent";
function init(){
var options = {
projection: "EPSG:900913",
units: "m",
// this resolution displays the globe in one 256x256 pixel tile
maxResolution: 156543.0339,
// these are the bounds of the globe in sperical mercator
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508,
20037508)
};
map = new OpenLayers.Map('map', options);
// create Google layer
var gsat = new OpenLayers.Layer.Google(
"Google Sattelite",
{type: G_SATELLITE_MAP, 'sphericalMercator': true, minZoomLevel: 1,
maxZoomLevel: 24}
);
var wms = new OpenLayers.Layer.WMS(
"TOPP States",
"http://localhost:8080/geoserver/wms?",
{
layers: 'topp:states',
styles: '',
srs: 'EPSG:4326',
format: 'image/png',
tiled: 'true',
tilesOrigin : "143.60260815000004,-43.851764249999995",
transparent: true
},
{
'opacity': 0.75, 'isBaseLayer': false, 'wrapDateLine': true
}
);
map.addLayers([gsat, wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition());
map.zoomToMaxExtent();
}
I think it must have something to do with the projections but I've got no
idea what!
Any help would be much appreciated. I've tried searching for an answer but
as you could imagine "geoserver grid lines" returned a lot of unrelated
results!
Cheers,
J
--
View this message in context: http://www.nabble.com/Grid-lines-appear-on-overlay-tp24508427p24508427.html
Sent from the GeoServer - User mailing list archive at Nabble.com.