Hi, I'm new to this project and was wondering if there is any way in the API or otherwise (like tag in url) to not display the country boundaries and their names but display every thing else ? Any mechanism to filter out those two layers on the fly ? Thanks Jeff asked 18 Mar '16, 18:52 Jeff_Lacoste SimonPoole ♦ |
No. The maps consist of images that have been created and cached; allowing you to switch individual layers on and off would mean we'd have to store many more cached versions, or compute them whenever someone requests them, which would need more resources than we have. But all is not lost, you can set up your own tile server that creates maps without these features, or indeed with any style changes you like! Seach for "render my own map" in this help system or consult switch2osm.org for details. With luck you find someone who has already made a map like the one you are looking for, and is allowing you to use it - for example How to hide all labels of OSM which discusses a label-less map. answered 18 Mar '16, 18:56 Frederik Ramm ♦ Thank you !
(18 Mar '16, 19:14)
Jeff_Lacoste
|
It is possible to filter out the names on the fly, but only on the way into the rendering database. Obviously this is only an option if you're rendering maps on your own server. A basic guide to setting up your own server is here. When you load the data you have an option of using a script to do things with tags on the way into the database (osm2pgsql, used for database loading, ships with an example). This is something I do when I create tiles for my own use, the procedure is described on this page. The tag transform script that I use is this one (but you'd want to create something much simpler) and the section that removes admin boundaries is here. Obviously http://www.openstreetmap.org/ is only one way of many that users see OpenStreetMap data, and there are equivalent mechanisms for some of the others too. For example, for OsmAnd you can create your own data files and have some control over what gets displayed. answered 18 Mar '16, 19:35 SomeoneElse ♦ |
Instead of rendering bitmaps that are static, you can alternatively use vector data and vector graphics. See Vector_tiles in the OSM wiki for a collection and overview, or the mentioned osm2vectortiles.org. With those solutions you should be able to change the map styling on-the-fly, so let any names or boundary lines disappear. answered 19 Mar '16, 11:51 stephan75 What osm2vectortiles.org seems to be missing is any kind of "how to" information. The site offers commercial support, which is fine, but other than that this isn't something that's an answer at the level that this question is asked at. For example, http://osm2vectortiles.org/docs/start/ has some instructions, which include "docker run (something)". Most people who try and follow those instructions will simply get some sort of "not found" or "not installed" message - it's simply not pitched at that level.
(19 Mar '16, 12:22)
SomeoneElse ♦
Thanks 'Stephan75' for the pointers about vector tiles. Do you happen to know if there is a tool or a way to let's say after downloading an mbtiles file for a country or world, to hide a layer ? Is MapBox the only way to do it ? Upload the tiles to MapBox, do the editing there (hide layers if mbtiles are organized as layers and not one huge layer) and styling then export the touched mb tiles to a new mb tiles ? Thanks
(19 Mar '16, 15:29)
Jeff_Lacoste
I downloaded one country mb tiles and tried to upload it to mapbox. The download failed at the end with error stating that some tiles are too dense: "Tile exceeds maximum size of 500k at z5. Reduce the detail of data at this zoom level..". As it stand the tiles are they are not usable by MapBox for uploading and eventually editing (hide some layers).
(19 Mar '16, 17:48)
Jeff_Lacoste
|
Thanks every one for your responses. It was very helpful. If needed I'll post new questions but not in this thread. Thanks again.