NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

noncomp
21226
accept rate: 0%

edited 21 Nov '18, 18:35


Not without creating your own tile layer that doesn't include buildings, no.

Is that something that you're interested in doing?

permanent link

answered 21 Nov '18, 18:36

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×287
×252
×204
×24
×10

question asked: 21 Nov '18, 18:34

question was seen: 3,246 times

last updated: 21 Nov '18, 19:11

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum