[Tilecache] google maps (900913) and tilecache with openlayers
as the client
mmmmmm
mguraliuc1978 at yahoo.com
Wed Dec 17 10:40:20 EST 2008
Hi Ivan,
I am facing a similar problem with the one you mentioned you solved.
I have Geoserver serving a shapefile in EPSG:4326.
I am trying to overlay this data on top of google maps.
I am using OpenLayers and as long as I get the data directly from Geoserver
(with the reproject: true) if is overlayed correctly.
However when I am trying to get it via TileCache and add it as a new layer
on top of goole layer, only google gets displayed. My data does not.
If I am requesting only my data from TileCache I can see it. Only when I am
trying to overlay it on top of google it does not. I am sure it is because
google is EPSG:900913 and the data is EPSG:4326, but I am missing the
configuration needed.
Please post a complete configuration of this scenario.
My configuration is:
TileCache
[basic]
type=WMS
layers=topp:line
url=http://10.10.10.241:8081/geoserver/wms?transparent=true
extension=gif
srs=EPSG:4326
bbox=-180.0,-90.0,180.0,90.0
OpenLayers - javascript
var options =
{
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
numZoomLevels: 18,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508,
-20037508,20037508, 20037508.34)
};
map = new OpenLayers.Map( $('map'), options);
var gmapLayer = new OpenLayers.Layer.Google("GMaps2",{type:
G_HYBRID_MAP,'sphericalMercator': true});
map.addLayer(gmapLayer);
// THIS DOES NOT SHOW
layer = new OpenLayers.Layer.WMS( "VMap0",
"http://10.10.10.241/tilecache-2.04/tilecache.py?",
{layers: 'basic',reproject: false},
{format: 'image/gif', numZoomLevels: 18} );
map.addLayer(layer);
--
View this message in context: http://n2.nabble.com/google-maps-%28900913%29-and-tilecache-with-openlayers-as-the-client-tp1088699p1668416.html
Sent from the TileCache mailing list archive at Nabble.com.
More information about the Tilecache
mailing list