I'm accessing the OSM standard tile layer through "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png". I'm displaying it with Leaflet interactive maps. Is there any way to get it not to display the buildings? asked 21 Nov '18, 18:34 noncomp |
Not without creating your own tile layer that doesn't include buildings, no. Is that something that you're interested in doing? answered 21 Nov '18, 18:36 SomeoneElse ♦ Yes, how would you suggest I go about doing that?
(21 Nov '18, 18:39)
noncomp
2
I'd follow the switch2osm guide and set up a tile server exactly like OSM's standard layer then I'd remove the bit from that that displays buildings. That probably means editing this file so that the layer corresponding to buildings (which I've highlighted the start of) is removed. There may be a bit more to do than that (specifically generic building labels) but that should start you off.
(21 Nov '18, 18:47)
SomeoneElse ♦
Alright, thank you very much for your great help! I also thought of a quick-fix that doesn't require setting up a tile server, that may work: get the geometry of the buildings and display polygons over them the same color as the background to make them invisible.
(21 Nov '18, 18:58)
noncomp
1
You'd still need a tile layer for your "anti-buildings" though, so I'm not sure how that would help? Also decisions about whether things are displayed or not (where there are clashes) are made on the fly by Mapnik, so you'd need to reverse that logic too...
(21 Nov '18, 19:04)
SomeoneElse ♦
Leaflet allows you to display polygons on top of the existing tile layer, so you don't need to setup another one.
(21 Nov '18, 19:11)
noncomp
|