Skip to main content
title statement; naming; English usage; removed helpme/gratefulness
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

How can I render Rendering Google Map's tileMaps tiles in leafletLeaflet (Offlineoffline)?

I have Google MapMaps tiles on my computer in a folder. I want to use it offline in the leafletLeaflet. Actually, leafletLeaflet use by a link to load the map like below:

      L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
        maxZoom: 19,
        attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
      }).addTo(map);

When I replace the local link on my computer file:///D:/Map/{z}/{x}/{y}.png instead of https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png, the map does not load. But this link file:///D:/Map/5/5/5.png load correctly a tile on my browser and also it is same as this link on openstreetmapOpenStreetMap https://{s}.tile.openstreetmap.org/5/5/5.png It would be grateful if anyoneHow can help me.I do this?

How can I render Google Map's tile in leaflet (Offline)?

I have Google Map tiles on my computer in a folder. I want to use it offline in the leaflet. Actually, leaflet use by a link to load the map like below:

      L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
        maxZoom: 19,
        attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
      }).addTo(map);

When I replace the local link on my computer file:///D:/Map/{z}/{x}/{y}.png instead of https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png, the map does not load. But this link file:///D:/Map/5/5/5.png load correctly a tile on my browser and also it is same as this link on openstreetmap https://{s}.tile.openstreetmap.org/5/5/5.png It would be grateful if anyone can help me.

Rendering Google Maps tiles in Leaflet (offline)

I have Google Maps tiles on my computer in a folder. I want to use it offline in Leaflet. Actually, Leaflet use by a link to load the map like below:

      L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
        maxZoom: 19,
        attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
      }).addTo(map);

When I replace the local link on my computer file:///D:/Map/{z}/{x}/{y}.png instead of https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png, the map does not load. But this link file:///D:/Map/5/5/5.png load correctly a tile on my browser and also it is same as this link on OpenStreetMap https://{s}.tile.openstreetmap.org/5/5/5.png How can I do this?

Source Link

How can I render Google Map's tile in leaflet (Offline)?

I have Google Map tiles on my computer in a folder. I want to use it offline in the leaflet. Actually, leaflet use by a link to load the map like below:

      L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
        maxZoom: 19,
        attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
      }).addTo(map);

When I replace the local link on my computer file:///D:/Map/{z}/{x}/{y}.png instead of https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png, the map does not load. But this link file:///D:/Map/5/5/5.png load correctly a tile on my browser and also it is same as this link on openstreetmap https://{s}.tile.openstreetmap.org/5/5/5.png It would be grateful if anyone can help me.