Bilal Ahmed
Bilal Ahmed

Reputation: 21

Display offline ArcGIS Esri map using Leaflet

I need to display ArcGIS ESRI map hosted in intranet environment. I was following this example and it works fine when system is connected to internet.

As our Map Server is hosted in intranet environment so I cannot use above example. I have further investigated ESRI leaflet and found out that its making calls to online arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer for loading map tiles. I replaced this URL with our Map server URL https://{our domain}/intsrv/rest/services/Cache/StreetsNightBlue/MapServer but still tiles are not loaded.

I have added all required CSS and JS files offline in my project already.

 mapObject = L.map('mapDiv').setView([defaultLat, defaultLong], defaultZoom);
    L.esri.basemapLayer('Gray').addTo(mapObject);
    L.esri.Cluster.featureLayer({
        url: 'https://{our domain}/intsrv/rest/services/Cache/StreetsNightBlue/MapServer/0'
    }).addTo(mapObject);

When I run program, in console it giving tile not found error.

enter image description here

Update: Tiles appearing now but far away from marker cluster

enter image description here

Kindly help to fix this issue.

Upvotes: 0

Views: 664

Answers (0)

Related Questions