Experimenting with ClearTables, self-hosted vector tiles, and Tangram client-side rendering
Do pnorman đăng vào 24 tháng 08 năm 2016 bằng English. Cập nhật lần cuối cùng vào 26 tháng 08 năm 2016.I’ve been experimenting with generating my own vector tiles and client-side rendering with Tangram in order to figure out how to best write a style in its language.
Tangram is a GL-based renderer written by Mapzen and normally used with their Tilezen vector tiles, but I’m interested in being able to make my own vector tiles with different cartographic choices.
Having a diverse selection of vector tile schemas is important, as is avoiding a situation where only large players in the market can get involved like right now.
For a toolchain I used osm2pgsql with ClearTables and Mapnik via Kosmtik to write vector tiles. With the demo I’m serving pre-rendered vector tiles from disk, but Kosmtik is useful in development with it’s xray functionality. I input the style into Tangram Play, a web-based editor that automatically reloads the map when you change the style.
The cartography and vector tile definitions are loosely based on OSM Clear, a demo style I wrote. I didn’t want to learn the language while designing new cartography at the same time. Being a learning exercise I don’t consider the style complete or free of bugs.
The demo page is on my server at http://tangram-clear-demo.faramir.paulnorman.ca/ with the style and vector tile code at https://github.com/ClearTables/tangram-clear-demo.
I’m not sure what direction I’m going to take next as I don’t have any particular style goals right now, or collaborators.
Cross-post from https://lists.openstreetmap.org/pipermail/dev/2016-August/029448.html
Thảo luận
Bình luận của Severak vào 25 tháng 8 năm 2016 lúc 10:54
It takes some time to render the demo. Which tool did you used to generate vector tiles?
Bình luận của pnorman vào 26 tháng 8 năm 2016 lúc 00:32
The vector tiles were pre-rendered Kosmtik, using Mapnik. I just scraped my local development setup with curl. There are better ways to do this, but this had the advantage of being easy.
I looked at the network timeline, and the slowness is coming from a few causes