[OpenLayers-Users] OpenLayers / TileCache setup

John Williams jdwilliams1982 at gmail.com
Thu Oct 27 16:31:05 EDT 2011


I have a setup with mapnik, tilecache and OpenLayers on Ubuntu that I can't
get to work quite right. I'm mailing this list because I'm pretty sure it's
an issue with my OpenLayers configuration. My tilecache config looks like
this:

[cache]
type=Disk
base=/tmp/tilecache

[osm]
type=Mapnik
mapfile=/path/to/osm.xml
spherical_mercator=true
levels=19

And my javascript:

options = {
          maxResolution:156543.0339,
          units:'m',
          projection: new OpenLayers.Projection("EPSG:900913"),
          displayProjection: new OpenLayers.Projection("EPSG:4326"),
          maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
          restrictedExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
          numZoomLevels: 19
};

map = new OpenLayers.Map('map', options);

layer = new OpenLayers.Layer.TMS("osm", "/tilecache/",
            {serviceVersion: "1.0.1", layername: "osm", type: "png",
sphericalMercator: true});

map.addLayer(layer);

I'd appreciate any thoughts about what I am/may be doing wrong. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111027/491ddce4/attachment-0001.html


More information about the Users mailing list