New answers tagged

1

Solution 1: for exporting mapnik's xml (it's hacky) exports.LocalConfig = function (localizer, project) { var s = project.mml.Stylesheet[0]; s.data = s.data.replace("Map {", "Map { buffer-size: 512;\n"); }; Soluton2: for rendering tiles: exports.LocalConfig = function (localizer, project) { project.mml.bufferSize = 2560; };


0

If you just want OpenStreetMap data in Mapbox Vector Tile format, MapZen provides this service for free: https://mapzen.com/projects/vector-tiles/ All the tooling required to do it is open: https://github.com/mapzen/vector-datasource


0

Would it be technically possible to have Mapbox's compact vector tile format sent to the client (instead of PNG tiles), then rendered inside the browser with JS code That's exactly what Mapbox-GL-JS does. Leaflet.MapboxVectorTile is another option, implemented as a plugin to Leaflet. when using TM2/Mapbox Studio, why are the tiles rendered remotely? ...


1

kaveh is probably right. The zoom_to_box()method sets the extent and then call the fixAspectRatio()method. More details here: https://github.com/mapnik/mapnik/blob/7931295d3322b7cc57f820d7e2db6449d791159f/src/map.cpp#L581 Depending on the aspect_fix_mode that you have picked, it will readjust the extent. If you don't want it to modify your extent, you can ...


1

This sounds like a perfectly reasonable thing to do with mapnik. You have (at least) two options to do that. The first and simplest option is to do something along the lines of (pseudo code): create a mapnik map create a style (potentially based on user input) # you can also create a style per layer append the style to the map for each file create a ...


0

I have been working on something similar. You can probably use the mapnik printing module for most of the things you need (scale, legend, etc.). You will probably have to tweak it a little bit to get the design you want. Have a look at render_legendand render_scalein particular. Here is the link to the module on GitHub: https://github.com/mapnik/python-...



Top 50 recent answers are included