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

I'm new to OSM and want to create a leaflet map using OSM that shows only city names on the map and does not show any label or landmark like hotel, hospitals, etc. Kindly help me create this map.

Here's the sample code:

// Create a Leaflet map centered at a specific location and zoom level
  const map = L.map("leaflet-map-popup").setView([20.5937, 78.9629], 5);

  // Customize the map's appearance with a custom tile layer (HOT style)
  L.tileLayer("https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png", {
    maxZoom: 16,
    tileSize: 512,
    zoomOffset: -1,
  }).addTo(map);

Thanks in advance

asked 09 Sep '23, 09:20

Aditya_07's gravatar image

Aditya_07
11112
accept rate: 0%

closed 13 Sep '23, 09:12

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701

The question has been closed for the following reason "Duplicate Question" by SimonPoole 13 Sep '23, 09:12

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:

×710
×362
×74
×6
×4

question asked: 09 Sep '23, 09:20

question was seen: 1,080 times

last updated: 13 Sep '23, 09:12

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