Tag Info

New answers tagged


Preparing the vector PBF tiles is the first step. The MapBox Studio Classic is able to generate for you the vector PBF tiles (packed in MBTiles format) from any vector source (ShapeFiles, PostGIS, ...) and is quite easy to use. Under the hood it does the rendering with the mapnik+mapnik-vector-tile as you mentioned wrapped in tilelive (so scripting is ...


Besides hardware and other software, rendering performance depends on the database, custom indexes, and the SQL in the style rendered. The style makes a huge difference, and badly written layer definitions can result in abysmal performance. If you change the database schema, it requires changing both the custom indexes and layer SQL, so it's not possible to ...


I came up with this solution, found on http://bit.ly/1Qyd094 bounds = (-6.5, 49.5, 2.1, 59) # spherical mercator (most common target map projection of osm data imported with osm2pgsql) merc = mapnik.Projection('+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over') # long/lat in degrees, ...


Tile layers have a north of south origin for the Y axis. By default leaflet expects the y origin to start in the north, but your tiles start in the south. To make leaflet work with this initalize your tile layer with the option tms:true, L.tileLayer('http://localhost:8080/1.0.0/osm/{z}/{x}/{y}.png'{'tms':true}).addTo(map);

Top 50 recent answers are included