[Tilecache] Tilecache projection problem w/ Google Maps and
Geoserver WMS
jordanderson
jordandrsn at gmail.com
Mon Nov 10 12:34:36 EST 2008
Hi all,
I'm able to get Tilecache up-and-running a WMS layer from Geoserver. It's
working great on its own. I'd also like to get it working with an existing
OpenLayers application I've built that includes a Google Maps layer and some
other vector layers. The OpenLayers map is EPSG:900913; the WMS layer is
EPSG:4623.
The integration of the two layers works fine if I'm not using Tilecache.
(For example, if I create the nycmap OpenLayers layer with gsServer using
the code below, it works fine.) When I use Tilecache -- using tcServer in
the code below -- Tilecache doesn't render any tiles. Not even pink tiles,
just empty PNGs.
I checked the access.log and the entries look like this:
"GET
/tilecache/tilecache.py?LAYERS=nycmap&TILED=true&FORMAT=image%2Fpng8&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-8208725.000931252,4951096.705981249,-8198941.061312502,4960880.6455999985&WIDTH=256&HEIGHT=256
HTTP/1.1"
Note that the SRS it requested was EPSG:900913 and the bbox reflects that
SRS. That seems to be the problem...
If I set tcServer =
"http://myserver.com/tilecache/tilecache.py?EPSG%3A4623", I can force it to
use the correct SRS, but the BBOX still reflects EPSG:900913.
I'm sure there's one little thing I'm missing, so please let me know if you
notice anything I'm obviously doing wrong. Thanks!
Jordan
-----------------
OpenLayers code:
var options = {
maxExtent: new OpenLayers.Bounds(-20037508,-136554022,20037508,136554022),
maxResolution: 156543.0339,
projection: "EPSG:900913",
units: "m",
controls: [],
numZoomLevels: 18
};
map = new OpenLayers.Map('mapDiv', options);
var gmap = new OpenLayers.Layer.Google(
"Google street map",
{'sphericalMercator': true, 'minZoomLevel': 11, 'numZoomLevels': 7}
);
var tcServer = "http://myserver.com/tilecache/tilecache.py?"; // This
doesn't work...
var gsServer = "http://myserver.com:8080/geoserver/wms"; // This does
work...
var nycmap = new OpenLayers.Layer.WMS(
"NYC Map",
tcServer,
{layers: 'nycmap', tiled: 'true', format: 'image/png8'}
);
map.addLayers([gmap, nycmap]);
Tilecache configuration:
[nycmap]
type=WMSLayer
layers=nycmap
url=http://myserver.com:8080/geoserver/wms?
mime_type=image/png8
extension=png
srs=EPSG:4623
bbox=-180.0,-90.0,180.0,90.0
--
View this message in context: http://www.nabble.com/Tilecache-projection-problem-w--Google-Maps-and-Geoserver-WMS-tp20343197p20343197.html
Sent from the TileCache mailing list archive at Nabble.com.
More information about the Tilecache
mailing list