[Tilecache] mapnik + tilecache + openlayers
ritesh ambastha
ritesh.linux at gmail.com
Tue May 19 15:28:52 EDT 2009
Hey,
You need to remember few things:
1. Value of resolutions array specified in tilecache.cfg should be similary
specified in openlayers html file that you will make.
2. Similary, values of maxResolution, scales should be same in both the
files.
Regards,
Ritesh Ambastha
kryptonite wrote:
>
> Hi,
> I have been trying for the past few days to get a simple map to display
> with mapnik+tilecache+openlayers. I have installed mapnik , and got the
> default rundemo.py running , map.xml being one that was generated. the
> image files were generated too like the documentation on mapnik says. I
> have also successfully displayed a map using openlayers and tilecache but
> this time was with mapserver.
> But coming to the main problem which is using
> tilecache+openlayers+mapnik. Now all i did in the tilecache.cfg was
> include a layer like this:
>
> [testlayer]
> type=Mapnik
> mapfile=C:\mapnik_0_6_0\demo\python\map.xml
> bbox=-8024477.28459,5445190.38849,-7381388.20071,5662941.44855
> maxResolution=2545.4906698
> extent_type=loose
> srs=EPSG:900913
>
> in the index.html , I included:
>
> var options = {
> controls: [
> new OpenLayers.Control.MouseDefaults(),
> new OpenLayers.Control.KeyboardDefaults(),
> new OpenLayers.Control.PanZoomBar(),
> new OpenLayers.Control.LayerSwitcher(),
> new OpenLayers.Control.Permalink()
> ],
> maxResolution: 2545.4906698,
> maxExtent: new
> OpenLayers.Bounds(-8024477.28459,5445190.38849,-7381388.20071,5662941.44855),
> units: "m",
> projection: "EPSG:900913"
>
> };
>
> function init(){
> map = new OpenLayers.Map( 'map', options);
> layer = new OpenLayers.Layer.WMS( "VMap0",
> "/cgi-bin/tilecache.cgi?",
> {
> layers : 'testlayer
>
> }
> );
> map.addLayer(layer);
> }
>
> But after doing all this , the browser only displays pink tiles.There is
> no folder created for the testlayer images. I am simply lost. Can anyone
> point out what I am really missing here.I would really appreciate it.
>
--
View this message in context: http://n2.nabble.com/mapnik-%2B-tilecache-%2B-openlayers-tp2935333p2941732.html
Sent from the TileCache mailing list archive at Nabble.com.
More information about the Tilecache
mailing list