[Tilecache] WMS vs TileCache problems
D_Guidi
diegoguidi at gmail.com
Thu Mar 27 07:10:38 EDT 2008
I'm using TileCache to create a tile cache (yep!!!) for my WMS server.
My data is for an Italy region (Sardinia) in SRS 32632 (WGS 84 32N) so I've
configured tilecache with this parameters:
[RASTER_IMG_2006]
type=WMS
url=http://mymapserverinstance/cgi-bin/mapserv.exe?MAP=/ms4w/apps/ows/service/sardegna.map
layers=RASTER_IMG_2006
extension=png
bbox=800000,4650000,1150000,5100000
resolutions=156543.0339,78271.51695,39135.758475,19567.8792375,9783.93961875,4891.969809375,2445.9849046875,1222.99245234375,611.496226171875,305.7481130859375,152.87405654296876,76.43702827148438,38.21851413574219,19.109257067871095,9.554628533935547,4.777314266967774,2.388657133483887,1.1943285667419434,0.5971642833709717,0.29858214168548586
maxResolution=156543.0339
srs=EPSG:900913
extent_type=loose
the resolutions looks necessary because my data must fit with google
resolutions, because I'm projecting my data over google tiles: btw my
opelayers client works well and using a test page with tilecache wms server
all tiles are well generated:
samplepage.html
...
function init(){
map = new OpenLayers.Map( $('map'), {
controls: [],
maxExtent: new OpenLayers.Bounds(800000, 4650000, 1150000, 5100000),
maxResolution: 156543.0339,
numZoomLevels: 20,
minZoomLevel: 8,
maxZoomLevel: 20,
projection: "EPSG:900913",
units: "m"});
layer = new OpenLayers.Layer.WMS(
"Ortofoto", "tilecache.py?",
{ layers: 'RASTER_IMG_2006', format: 'image/png' });
map.addLayer(layer);
map.setBaseLayer(layer);
layer.resolutions = resolutions; // force to fit layer to google
resolutions!
...
this page (built with openlayers) works well, but if i change the layer
definition to use a TileCache layer like below:
...
layer = new OpenLayers.Layer.TileCache(
"Ortofoto",
"http://localhost/tilecache2", // contains my pregenerated tiles
"RASTER_IMG_2006", { format: 'image/png' });
map.addLayer(layer);
map.setBaseLayer(layer);
layer.resolutions = resolutions; // force to fit layer to google
resolutions!
...
all tile images are wrong: i mean that the server ask for tiles that are not
related to the correct geographic position, so the tile for a lower region
of the data is moved to the top.
Any suggestion? Or we need to specific informations?
--
View this message in context: http://www.nabble.com/WMS-vs-TileCache-problems-tp16323595p16323595.html
Sent from the TileCache mailing list archive at Nabble.com.
More information about the Tilecache
mailing list