[Tilecache] google maps (900913) and tilecache with openlayers as the client

Roger André randre at gmail.com
Wed Dec 17 12:01:23 EST 2008


Change your tilecache.cfg entry so that the srs is Google Spherical
mercator, srs=EPSG:900913, and change your bbox entry to be in 900913
coords, or remove it altogether.

Roger
--

On Wed, Dec 17, 2008 at 7:40 AM, mmmmmm <mguraliuc1978 at yahoo.com> wrote:

>
> 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<http://10.10.10.241:8081/geoserver/wms?transparent=trueextension=gifsrs=EPSG:4326bbox=-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.
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20081217/5663e9e6/attachment.html


More information about the Tilecache mailing list