[Tilecache] Mapserver and TileCache Problem

GuzmanRejon guzman.rejon at radmas.com
Wed Jun 18 14:03:56 EDT 2008


Hello, first of all sorry for my English, i am spanish.

I have a problem with tilecache config, above show you my enviroment:
Apache
Mapserver
tilecache
python-2.5.2
on Windows XP Platform.

My config files are:

tilecache.cfg
-------------

[Callejero]
type=MapServerLayer
mapfile=C:/ms4w/apps/ka-map-1.0/gmap/mapaValdilecha/openLayer.map
extension=png
size=256,256
bbox=470000,4456000,480240,4465216
layers=MANZANAS
resolutions=20.0,10.0,5.0,2.5,1.25,0.625,0.3125
srs=EPSG:23030
extent_type=loose
levels=7
______________________________________________________________

Openlayer.map
--------------
MAP
  NAME 	    		Callejero
  
  STATUS        ON  
  SYMBOLSET     ../etc/symbols.sym
  SIZE 					256 256
  EXTENT        470000 4456000  480240 4465216
  UNITS         METERS
  SHAPEPATH     "../dataValdilecha"
  IMAGECOLOR    255 255 255
  FONTSET       ../etc/fonts.txt
  
  IMAGETYPE PNG
	IMAGEQUALITY 85
	INTERLACE off
	RESOLUTION 96
	UNITS meters
	TRANSPARENT off
	OUTPUTFORMAT
	  NAME png
	  DRIVER "GD/PNG"
	  MIMETYPE "image/png"
	  IMAGEMODE RGB
	  EXTENSION "png"
	  FORMATOPTION  "INTERLACE=OFF"
	END 

  # PROYECCIÓN  UTM
  PROJECTION
    "init=epsg:23030" # ED(50) UTM ZONA 30    
  END

  #PLANTILLA HTML
  WEB
    IMAGEPATH   "/tmp/ms_tmp/" 
    IMAGEURL    "/ms_tmp/"
    HEADER      'plantillas/cabecera.html'
    FOOTER      'plantillas/imagen.html'
    ERROR       "../error.html"
#    MAXSCALE    500000
#    MINSCALE    500
#    LOG         "/tmp/gmap.log"
    METADATA
      "wms_title"					"Callejero"
			"wms_onlineresorce"
"http://127.0.0.1/cgi-bin/mapserv.exe?map=/ms4w/apps/ka-map-1.0/gmap/mapaValdilecha/openLayer.map&"
			"wms_srs"						"EPSG:23030"
    END 
  END
...................................
...................................
_______________________________________________________________________________________________

And my index.html
------------------

<script src="http://openlayers.org/api/OpenLayers.js"></script>
    <script type="text/javascript">
                var map, vectors, controls, match;
                var tilecacheBbox = new
OpenLayers.Bounds(470000,4456000,480240,4465216);
                function init(){
                        var lon = 474456;
                        var lat = 4460717;
                        var zoom = 3
                        OpenLayers.IMAGE_RELOAD_ATTEMPTS = 1;
                        var map_options = {
                                maxExtent: tilecacheBbox,
                                maxResolution: 20,
                                projection:"EPSG:23030",
                                units: "meters",
                                numZoomLevels:7
                        };
                        map = new OpenLayers.Map("map", map_options);
                        layer = new OpenLayers.Layer.WMS("Callejero",
           							"http://localhost/Openlayer/tilecache/tilecache.cgi?",
                        {layers: 'Callejero', format: 'image/png' }
                        );
                        map.addLayers([layer]);
                        if (!map.getCenter()) map.zoomToMaxExtent();
                				map.setCenter(new OpenLayers.LonLat(lon,lat), zoom);
                        map.addControl(
                                new OpenLayers.Control.MousePosition());
                };
    </script> 

The problem is i obtain a set of pink images, my map don´t show.

This URL:

http://localhost/Openlayer/tilecache/tilecache.cgi?LAYERS=Callejero&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A23030&BBOX=474230,4460860,474275,4460905&WIDTH=256&HEIGHT=256%20HTTP/1.1

show this message:

An error occurred: can't find resolution index for 0.175781. Available
resolutions are: 
[20.0, 10.0, 5.0, 2.5, 1.25, 0.625, 0.3125]

and i don´t know how to solve it.

thank in advance.
-- 
View this message in context: http://www.nabble.com/Mapserver-and-TileCache-Problem-tp17988647p17988647.html
Sent from the TileCache mailing list archive at Nabble.com.




More information about the Tilecache mailing list