How to create leaflet map showing only city names and using OpenStreetMap

382 Views Asked by At

I am new to leaflet map and I want to create a leaflet map that does not display any landmarks or labels like hospitals, hotels, etc. and the map should display city names. Also I want the OpenStreetMap to be used to create the map.

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

  // Use MapTiler Satellite tile provider
  L.tileLayer(
    "https://api.maptiler.com/maps/hybrid/{z}/{x}/{y}.jpg?key=LsOBBLUb02hq92h90fJ7",
    {
      maxZoom: 18,
      attribution:
        '© <a href="https://www.maptiler.com/copyright/">MapTiler</a>',
    }
  ).addTo(map);

I tried to use the maptiler tile layer to get the desired output, but I want the map to use OpenStreetMap tile layer that does not show any label or landmarks and only shows city names.

0

There are 0 best solutions below