Select to view content in your preferred language

Load a Basemap from a VectorTileServer

423
2
Jump to solution
07-14-2023 05:54 AM
padmalcom
Occasional Contributor

Hi, we host a VectorTileServer (tile format is pbf) with this an URL like this:

https://mydomain.com/arcgisimage/rest/services/Hosted/WW_mygeo_Afrika_111111_B_/VectorTileServer/til...

The code to load the server looks like this. The load is successful but the map remains gray. Loading the map in the browser works fine.

val webTileLayer = WebTiledLayer.create("url_from_above")
webTileLayer.load()
.onSuccess {
Timber.d("WmsLayer loaded with status ${webTileLayer.loadStatus.value}")
webTileLayer.let {
Timber.d("There are ${webTileLayer.subDomains.size} subdomains in the tile layer")
mapView.map = ArcGISMap(Basemap(webTileLayer))
}
}

Do you have any idea why loading the map does not work?

 

1 Solution

Accepted Solutions
ChanganShi1
New Contributor III

You should use ArcGISVectorTiledLayer to load the vector tile service, then use the layer in your Basemap, and give it a try.

View solution in original post

0 Kudos
2 Replies
ChanganShi1
New Contributor III

You should use ArcGISVectorTiledLayer to load the vector tile service, then use the layer in your Basemap, and give it a try.

0 Kudos
padmalcom
Occasional Contributor

Thank you @ChanganShi1, using ArcGISVectorTiledLayer helped.

private val webTiledLayer = ArcGISVectorTiledLayer(VECTOR_TILE_SERVER)

 

0 Kudos