[OpenLayers-Users] OpenLayers sending wrong url to TileCache?
rtaitmilne
rtaitmilne at telenium.ca
Thu Feb 12 18:33:56 EST 2009
Hi,
I am trying to setup a new installation of Mapserver/TileCache/OpenLayers on
top of Ubuntu Server 8.10 in baby steps.
I have a layer of highways drawing with mapserver and being cached with
TileCache(cgi). It seems like OpenLayers is not requesting the right URL to
get the proper Tiles. What I get is a map filled with the same tile over
and over again. The correct tiles are there if I manually request them in
the address bar, with a URL that represents the directory structure found
under /tmp/tilecache (my DiskCache).
The first 3 URL's that OpenLayers requests all get the same image: (from
FireBug's net monitor)
http://localhost/cgi-bin/tilecache.cgi/1.0.0/segment/00/000/000/000/000/000/002.png
http://localhost/cgi-bin/tilecache.cgi/1.0.0/segment/00/000/000/001/000/000/002.png
http://localhost/cgi-bin/tilecache.cgi/1.0.0/segment/00/000/000/002/000/000/002.png
I can get 3 tiles that look like they should go next to each other when I
manually request the 3 above URL's without the "000" directories in the
path.
Is there something wrong with my configuration? Thoughts?
I am using:
MapServer 5.0.3-2
TileCache 2.0.3-1 (latest in Ubuntu 8.10 packages)
OpenLayers 2.7
Using the tilecache.html example file
openlayers html/js snip:
<script type="text/javascript">
var map, layer;
function init(){
map = new OpenLayers.Map( $('map'));
layer = new OpenLayers.Layer.TileCache("Sask segment",
["/cgi-bin/tilecache.cgi/1.0.0/"],
"segment",
{
projection: "EPSG:26913",
units: "m",
format: 'image/png',
maxExtent: new OpenLayers.Bounds(133977.89 ,
5427363.5 , 766071.31 , 6661918.0),
maxResolution: 823.038307292,
numZoomLevels: 7,
transitionEffect: "resize"
});
map.addLayer(layer);
//map.setCenter(new OpenLayers.LonLat(389986, 5770768), 0);
if(!map.getCenter()) map.zoomToMaxExtent();
}
...
</script>
tilecache.cfg snip:
[segment]
type=MapServerLayer
mapfile=/usr/lib/cgi-bin/mapfile/sk.map
extension=png
levels=7
layers=segment
size=256,256
bbox = 133977.89 , 5427363.5 , 766071.31 , 6661918.0
srs=EPSG:26913
maxResolution = 823.038307292
--
View this message in context: http://n2.nabble.com/OpenLayers-sending-wrong-url-to-TileCache--tp2318601p2318601.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list