Select to view content in your preferred language

Combining offline and online maps

452
1
11-17-2025 05:50 AM
johnms93
Emerging Contributor

I want to combine both offline and online mapping. Right now I'm trying to create a `Basemap` from an offline map I load from storage and including an online map on top.

The justification for this is so when a user initially goes to the map they immediately see a map which is of a reduced quality, but then the online map begins to load in as the data comes through.

One of the issues we have is customers with slow connections so we want to avoid them sitting on a checkerboard grid screen.

However this doesn't seem to work. This is what I've done:

val onlineVectorTileLayer = ArcGISVectorTiledLayer(onlinePortalItem)
Basemap(baseLayers = listOf(getOfflineMapLayer(), vectorTileLayer))

Where `getOfflineMapLayer()` constructs from a bundled VTPK.

It only ever shows the offline map, but I want the online data to begin populating when it can. How can I achieve this?

0 Kudos
1 Reply
RamaChintapalli
Esri Contributor

Hi,

For your case, an ideal thing might be to check connectivity details using android's  ConnectivityManager , then add/remove relevant baselayer's of the basemap accordingly.

You can add multiple baselayers to your basemap, however they need to be in same spatial reference and the draw order of the layer's is fixed.

To check whether any specific layer has completed drawing or not, you can use the drawStatus on the Geoview to determine it.

Thanks
Rama

0 Kudos