Android: Displaying WmtsLayer in the operational layers

255
1
a month ago
aauser100
New Contributor

Hello, all

I am trying to add WmtsLayer in the operational layers - like it is in the example for WmsLayer  (draw attention 't' is absent) :  https://developers.arcgis.com/kotlin/sample-code/add-wms-layer/. Layer is added without any run-time errors (at least load result  is successful, isVisible is true and so on) but it is invisible on the the map. Network monitoring shows that there is no requests to server for tile getting.

Is it valid/supported WmtsLayer usage scenario?

NOTE:

At the same time this WmtsLayer can be displayed normally as the layer in the Basemap (scenario from arcgis examples: https://github.com/Esri/arcgis-runtime-samples-android/blob/main/java/wmts-layer/src/main/java/com/e.... Displaying WmtsLayer  in the basemap is not acceptable due to another limitations - mostly due to WmtsLayer transparency issue - it is visible when it is in the the Basemap.baseLayers with index 0, and layer (with really required basemap info) in index 1 is covered by it, and via versa.

SDK: com.esri:arcgis-maps-kotlin:200.3.0 

0 Kudos
1 Reply
aauser100
New Contributor

Issue was resolved - the reasons there were several:

- preferred image format: to get transparency outside image on the layer it required to specify  TileImageFormat.Png explicitly (default is Jpg and layer is filled out by white color so base map layer become invisible)

- cql_filter parameter (it cannot be parsed correctly when it is specified in url template, most likely due to = symbol in value) passing it via custom parameters resolving this obstacle

- tiles for some zoom levels can be absent on the tile provider (as result layer becomes invisible)