Offline maps difference between .Net and Android

858
5
05-15-2020 01:20 AM
TrondTunheim
New Contributor

Hi,

I´m new to the .NET sdk , I have been using the Android and IOS native SDKs for a while. I tried now to port a code that uses the Android SDK to a .NET WPF application. The code involves taking a Basemap offline. I have created a Webmap in our portal. The Webmap has only one layer the basemap layer "World Street Map". 

In the Android application I am fully able to take a pice of the map offline by specifying the extent and maxScale/minScale in the OfflineParamters and calling the OfflineMapTask. The gives me a package.info file and a directory p13 wich contains a .tpk and a .mmap file on my phone.

In the .NET application i try to use the same WebMap ( item ID) and area and take that offline. This results in the following message : "World_Street_Map_8421 : Tile export not enabled: Map service does not support export tiles and no alternative could be found". 

This is the same Webmap used in both Android and the .NET application. The Android version have no problems storing this map for offline use, but the .NET application throws the error. Is there a difference between the requirement for the map to be taken offline when i comes to Android and .NET ?. Or is it something else that I have overlooked ?. 

I would appreciate if someone could shed some light onto this.

0 Kudos
5 Replies
dotMorten_esri
Esri Notable Contributor

That's definitely curious - the code used to take the packages offline is coming from the same piece of code.

Is the service secured? Did you need to authenticate with the service?

0 Kudos
TrondTunheim
New Contributor

The Webmap is on an internal portal and is not secured by authentication. 

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

What is the URL the webmap contains and what URL is being requested?

With WPF you can use Fiddler to capture the request or add an event handler for the request begin event (noting that sometimes Fiddler can change request/response behavior).

ArcGISHttpClientHandler.HttpRequestBegin += (sender, request) =>
 {
    // Check the URL here.
};

Thanks

0 Kudos
TrondTunheim
New Contributor

The url in the webmap is for World Streetmap ( World_Street_Map (MapServer) )

I will try to use Wireshark to capture the traffic , both on the the Android client and on the WPF to see the difference..

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

The service at that URL does not support export (World_Street_Map (MapServer)).

Instead, for export you should reference: 

- Item: https://www.arcgis.com/home/item.html?id=e384f5aa4eb1433c92afff09500b073d 

- Url: https://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Street_Map/MapServer 

Thanks

Mike

0 Kudos