[Tilecache] google maps (900913) and tilecache with openlayers
as the client
mmmmmm
mguraliuc1978 at yahoo.com
Wed Dec 17 14:30:32 EST 2008
Hello Roger André,
Thank you very much for taking the time to answer my questions. I did what
you told me to but no luck :-(.
I will try to post the code and configurations maybe someone can spot what I
am missing.
1. Geoserver - the datastore is a shapefile in EPSG:4326
(the image shows the parameters in GeoServer config for this feature
"topp:line") http://n2.nabble.com/file/n1669365/1.JPG 1.JPG
2. The TileCache is running under IIS. In the TileCache's folder I have the
index.html file below:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 100%;
height: 99%;
border: 1px solid black;
}
body {
padding:0px;
margin:2px
}
#labs {
position:absolute;
bottom:15px;
left:7px;
font-size:smaller;
z-index: 5000;
}
</style>
<script type="text/javascript" src="OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, layer;
function init()
{
map = new OpenLayers.Map( $('map'),{numZoomLevels: 18});
layer = new OpenLayers.Layer.WMS("VMap0",
"tilecache.py?",{layers: 'basic', reproject: false},{format: 'image/gif',
numZoomLevels: 18} );
map.addLayer(layer);
map.addControl(new OpenLayers.Control.Permalink());
var center = new OpenLayers.LonLat(27.58731, 47.15125);
var projector = new OpenLayers.Projection("EPSG:900913");
map.setCenter(center.transform(projector,
map.getProjectionObject()), 12);
}
// -->
</script>
</head>
<body onload="init()">
<div id="map" style="background-color: #88cccc">
<div id="labs">From http://labs.metacarta.com/ MetaCarta Labs .</div>
</div>
</body>
</html>
3. TileCache configuration
[basic]
type=WMS
layers=topp:line
url=http://10.10.10.241:8081/geoserver/wms?transparent=true
extension=gif
srs=EPSG:900913
#spherical_mercator=true
#bbox=-20037508,-20037508,20037508,20037508
#maxResolution=156543.0339
In the configuration above I get the pink tiles.
If I change to srs=EPSG:4326 it works ok.
Moreover If I am trying to add a tilecache on top of a google layer I am not
getting the tiles no matter the SRS I use.
Please advice.
Thank you.
--
View this message in context: http://n2.nabble.com/google-maps-%28900913%29-and-tilecache-with-openlayers-as-the-client-tp1088699p1669365.html
Sent from the TileCache mailing list archive at Nabble.com.
More information about the Tilecache
mailing list