Hello everybody,<br><br> i have a problem with tilecache when using MAXSCALEDNOM / MINSCALEDENOM option in the map file definition.<br><br>the map file has a lots of layers, whose records looks like these:<br><br>...<br>
<br> 42 LAYER<br> 43 NAME spoj50_0_0<br> 44 TYPE RASTER<br> 45 UNITS meters<br> 46 STATUS ON<br> 47 PROJECTION<br> 48 "init=epsg:4326"<br> 49 # "init=epsg:2065" # krovak s-jtsk<br>
50 END<br> 51 MAXSCALEDENOM 10000000<br> 52 MINSCALEDENOM 200000<br> 53 DATA '/home/koleje/app/data5/spoj50/spoj50_0_0_0_0.tif'<br> 54 CLASS<br> 55 NAME "spoj50_0_0"<br> 56 STYLE<br> 57 COLOR 128 244 -1<br>
58 END<br> 59 # TEMPLATE<br> 60 END<br> 61 END<br><br>..<br><cut><br>...<br><br>387 LAYER<br>388 NAME spoj200_0_0<br>389 TYPE RASTER<br>390 UNITS meters<br>391 STATUS ON<br>392 PROJECTION<br>393 "init=epsg:4326"<br>
394 # "init=epsg:2065" # krovak s-jtsk<br>395 END<br>396 MAXSCALEDENOM 200000<br>397 MINSCALEDENOM 0<br>398 DATA '/home/koleje/app/data5/spoj200/spoj200_0_0.tif'<br>399 CLASS<br>400 NAME "spoj200_0_0"<br>
401 STYLE<br>402 COLOR 128 244 -1<br>403 END<br>404 # TEMPLATE<br>405 END<br>406 END<br>...<br><br><br><br>when i use this map file with mapserver via cgi call, everythings works fine and at some point the mapserver<br>
uses different layers (better quality - spoj200*) to render the map, you can check a working example here:<br><a href="http://koleje.hiro.cz/cgi-bin/mapserv?map=/home/koleje/app/koleje-test3.map">http://koleje.hiro.cz/cgi-bin/mapserv?map=/home/koleje/app/koleje-test3.map</a><br>
<br>then when I use the same map file in working tilecache environment, the map is not rendering (<a href="http://koleje.hiro.cz/test">http://koleje.hiro.cz/test</a>),<br>i get only light blue tiles, which usually means, i'm out of bounds (?)<br>
if I remove the MAX and MIN SCALEDENOM options from map file definition, tilecache works fine(!!) ( but of course without scaling) .<br><br>did i forgot about something? <br>i find that i maybe have to add a 'resolutions' option to the tilecache configuration, but i don't know what values i have to set<br>
(if its true that this option has to be set - maybe i'm completely wrong with this)<br><br>i'd appreciate any useful hint, advice or link to a resource dealing with such a dilemma.<br><br>Thanks a lot in advance<br>
Rene<br><br><br><br><br>tilecache.cfg<br>----------------<br>[cache]<br>type=Disk<br>base=/home/koleje/app/tmp/maps<br><br>[basic]<br>type=WMS<br>url=<a href="http://msdemo.hiro.cz/cgi-bin/mapserv?map=/home/koleje/app/koleje-test3.map">http://msdemo.hiro.cz/cgi-bin/mapserv?map=/home/koleje/app/koleje-test3.map</a><br>
layers=spoj50_0_0,spoj50_0_1,spoj50_0_2,spoj50_0_3,spoj50_0_4,spoj50_1_0,spoj50_1_1,spoj50_1_2,spoj50_1_3,spoj50_1_4,spoj50_2_0,spoj50_2_1,s<br>poj50_2_2,spoj50_2_3,spoj50_2_4,spoj200_0_0,spoj200_0_1,spoj200_1_0,spoj200_1_1<br>
extension=png<br>mapfile=/home/koleje/app/koleje-test3.map<br>srs=EPSG:4326<br>maxresolution=214<br>spherical_mercator=false<br>bbox=3427592,5503562,3536464,5663116<br><br><br>openlayers cfg from <a href="http://koleje.hiro.cz/test">http://koleje.hiro.cz/test</a>:<br>
----------------------------------------------------<br><br> ...<br> var epsg4326 = new OpenLayers.Projection("EPSG:4326");<br><br> var bounds = new OpenLayers.Bounds(3427592, 5503562, 3536464, 5663116);<br>
<br> map = new OpenLayers.Map('map',<br> {<br> maxExtent: bounds,<br> projection: epsg4326,<br> displayProjection: epsg4326,<br>
maxResolution: 214,<br> //controls: []<br> });<br><br> ....<br> layer = new OpenLayers.Layer.WMS( "Zakladni mapa",<br> ["<a href="http://koleje.hiro.cz:3128/tilecache/tilecache.cgi">http://koleje.hiro.cz:3128/tilecache/tilecache.cgi</a>?",<br>
"<a href="http://koleje1.hiro.cz:3128/tilecache/tilecache.cgi">http://koleje1.hiro.cz:3128/tilecache/tilecache.cgi</a>?",<br> "<a href="http://koleje2.hiro.cz:3128/tilecache/tilecache.cgi">http://koleje2.hiro.cz:3128/tilecache/tilecache.cgi</a>?",<br>
"<a href="http://koleje3.hiro.cz:3128/tilecache/tilecache.cgi">http://koleje3.hiro.cz:3128/tilecache/tilecache.cgi</a>?",<br> "<a href="http://koleje4.hiro.cz:3128/tilecache/tilecache.cgi">http://koleje4.hiro.cz:3128/tilecache/tilecache.cgi</a>?"],<br>
{<br> layers: 'basic',<br> <br> map: "/home/koleje/app/koleje-test3.map",<br> transitionEffect: 'resize',<br>
transparent: "false", format: "image/png",<br> },<br> {isBaseLayer: true, reproject: false, }<br> );<br><br> map.addLayer(layer);<br>
<br><br><br><br><br>