Hi All,

I am trying to setup Mapnik + tilecache but can't see any tiles in the
browser when I set bbox parameters in both Tilecache.cfg and Openlayers but
when I don't specify the bbox everything works fine and I can see actual map
tiles.

I was wondering if anyone can point out the problem in the code. I think I
have tried everything ( in my limited capability) and not really
understanding why would it not work. By the way all map layers ( for mapnik
styling) are sourced from a PostGIS database and have different projections
and transformed on the fly by Mapnik.

OpenLayers code:

    <script type="text/javascript">
        <!--
        var map, layer;

         function init(){
            var map, layer;

                var options =     {
                        numZoomLevels:20,
                        maxResolution: 360/512,
                        projection: "EPSG:4326",
                        //maxExtent: new
OpenLayers.Bounds(-2.0,50.0,2.0,54.0)
                        //not working when uncommented
                    };

            map = new OpenLayers.Map( 'map', options);
            layer = new OpenLayers.Layer.WMS( "Map24","tilecache.py?",
                                        {
                                            layers:'mapnik24',
                                            format: 'image/png',
                                            srs: 'EPSG:4326'
                                        } );
            map.addLayer(layer);
            map.addControl( new OpenLayers.Control.PanZoomBar());
            map.addControl( new OpenLayers.Control.MousePosition());
            map.addControl( new OpenLayers.Control.LayerSwitcher());
            map.addControl( new OpenLayers.Control.Permalink("permalink"));

            if (!map.getCenter()) map.zoomToMaxExtent();
       }


Tilecache.cfg:

[mapnik24]
type=Mapnik
mapfile=/somedit/map24.xml
#bbox=-2.0,50.0,2.0,54.0
levels=20
srs=EPSG:4326
projection=+proj=latlong +datum=WGS84

Thanks,
Adnan
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to