Closed mattmeye closed 5 years ago
If I remember correctly then carto does nothing with the shapefile datasource but presents it to Mapnik as is. So, yes, carto does support relative paths - for stylesheet files. In your case I think Mapnik would have to know how to resolve the path for the datasource. You can verify this if you look at the content of the data structure that carto outputs. It should contain your shapefile file path in one form or the other. You can also post or link that here and we can look together at it.
Disclaimer: It has been quite a while since I last worked with carto so I could be wrong.
Hey nebulon,
thank you for you comment. You were right. I fixed the problem to the shp-pathes, but i get another file not find error: "Error: file could not be found: 'img/marsh-16.png'"
the only reference to this file is in the base.mss inside the carto folder. inside the same directory there is a img folder with the image. do i need to configure this path too? maybe this setting in the configure.py of osm-brigth is wrong: config["path"] = path.expanduser("~/environment/cloud9TileTest/carto") ?
if i change the path manually from "img/marsh-16.png" to "carto/build/img/marsh-16.png" i get the error at the next reference (marsh-32). do you know how i can set a prefix for all resources?
@nebulon42 I found the solution. The build of osm-brigth was okay. The solution is to set a base path in the following mapnik function map.fromString(xml, { base: 'xyz' }, (err, map) => { ... })
Thank you for you help!
Hello,
im struggling with an serverless + mapnik + carto + osm-bright implementation for aws lambda. I believe that it exists a problem with relative pathes.
error
My development environment is aws cloud9.
project.mml
Usage of carto
I believe that the osm-bright is correctly builded: i copied this folder in my local windows tilemill project folder and see that the tiles can correctly generated.
What have I done wrong?