带有 TileCache 的 Mapnik Blue Tiles
我仍在尝试让我的服务器运行 OpenStreetMap。我安装了 TileCache 和 Mapnik。我将美国俄克拉荷马州的摘录导入到我的数据库中。我已经使用 OSM Mapnik 工具创建了 XML 样式表,并且我已经确认“generate_image.py”可以制作出漂亮的地图图像。我已经(至少我相信我已经)正确授予了 PostGIS 访问权限。我的用户对数据库中的所有表拥有完全权限。当我查看 Apache 日志时,我看到的只是有关缓存未命中的注释(我曾经看到数据库连接问题,但现在不再看到了)。在 Postgres 日志中,我没有看到任何内容(同样,我曾经看到访问被拒绝的问题,但现在不再看到了)。尽管如此,当我要求 TileCache 从 OSM Mapnik 层渲染图块时,我得到的只是这个图像:
无论我在地图上的哪个位置或处于什么缩放级别,该图像都会显示。我在 CGI 下运行 TileCache,它的配置如下:
[osm]
type=Mapnik
mapfile=/var/maps/bin/mapnik/osm.xml
spherical_mercator=true
我正在使用 OpenLayers,我的 Javascript 如下所示:
var map = new OpenLayers.Map("mapdiv");
var vec = new OpenLayers.Layer.TMS("TC", "http://maps.company.com/cgi-bin/tilecache/tilecache.cgi/", {serviceVersion: "1.0.0", layername: "osm", type: "png"});
map.addLayer(vec);
我已经在这台服务器上工作了两个半星期。我阅读了我能找到的所有博客、论坛或其他帖子。这是我今天的第三个问题。我越来越绝望了。我真的很感激任何人提供的帮助。
I am still trying to get my server running OpenStreetMap. I have TileCache and Mapnik installed. I have an extract of the U.S. state of Oklahoma imported into my database. I have used OSM Mapnik tools to create an XML stylesheet and I have confirmed that 'generate_image.py' makes a nice map image. I have (at least I believe I have) granted PostGIS access properly. My user has full permissions over all of the tables in the database. When I look in the Apache logs, all I see are notes about cache misses (I used to see database connection issues, but I don't any more). In the Postgres logs, I don't see anything (again, I used to see access denied issues, but I don't anymore). Despite all of this, when I ask TileCache to render a tile from the OSM Mapnik layer, all I get is this image:
This image shows up no matter where I am on the map or what zoom level I am at. I have TileCache running under CGI and it has a configuration like this:
[osm]
type=Mapnik
mapfile=/var/maps/bin/mapnik/osm.xml
spherical_mercator=true
I am using OpenLayers and my Javascript looks like this:
var map = new OpenLayers.Map("mapdiv");
var vec = new OpenLayers.Layer.TMS("TC", "http://maps.company.com/cgi-bin/tilecache/tilecache.cgi/", {serviceVersion: "1.0.0", layername: "osm", type: "png"});
map.addLayer(vec);
I have been working on this server for two and a half weeks. I have read every blog, forum, or other post I can find. This is my third question today. I am getting desperate. I would really appreciate any help anybody has.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您能确认 postgis 中有有效数据吗?打开 Quantum GIS 中的数据是一种很好的检查方法。
Can you confirm that you have valid data in postgis? Opening up the data in Quantum GIS is a good way to check.