Why dose mapview not show when i open the app whitout network?

741
4
07-20-2021 01:57 AM
zhenghanzhang
New Contributor

Hello everyone :

     I created an offline app according to work requirements.It works good when i test with network.But when i cut the network,and open my app,it shows blank.Dose Arcgis supports without networking totally?

0 Kudos
4 Replies
RamaChintapalli
Esri Contributor

Hi,

The offline map should work without network as long as the layers within the map are accessible offline.

What layers does your offline map have. And what does the load status of Map & the layers suggest when you opened them offline.

Thanks
Rama

0 Kudos
zhenghanzhang
New Contributor

thanks for answer! I just added basemap in my app.

load status: FAILED_TO_LOAD.

load exception:java.net.UnknownHostException: Unable to resolve host "basemaps-api.arcgis.com": No address associated with hostname.

0 Kudos
RamaChintapalli
Esri Contributor

Looks like you are trying to access a connected layer  without network connection.

If you are specifically looking to work with an offline map that has a Basemap that works disconnected, then you can take one of the esri's Basemap offline and use it. The below samples do that by either downloading tile package from service or use an already downloaded tile package.
https://github.com/Esri/arcgis-runtime-samples-android/tree/main/java/generate-offline-map

https://github.com/Esri/arcgis-runtime-samples-android/tree/main/java/generate-offline-map-with-loca...

Thanks
Rama

0 Kudos
zhenghanzhang
New Contributor

I Initialized the ArcGISMap by Basemap.Type.DARK_GRAY_CANVAS_VECTOR which needs network.I followed the samples you provided it works ,thanks a lot!

0 Kudos