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

Using leaflet and OSM, to show some maps on my web application, I need to know if it is possible to have only roads map and remove data from the map which is shown on my page

alt text

 L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    attribution: '',
    maxZoom: 19
}).addTo(map);

asked 12 Apr '21, 19:57

Ehsan_1362's gravatar image

Ehsan_1362
21224
accept rate: 0%


It is possible but you will have to set up your own tile server, and modify the map style to remove those elements you do not want. Setting up your own tile server is described on switch2osm.org.

permanent link

answered 12 Apr '21, 20:03

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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:

×362
×74

question asked: 12 Apr '21, 19:57

question was seen: 1,361 times

last updated: 12 Apr '21, 20:03

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