I was successful adding a WMTS layer to my ArcGIS online map, streaming imagery. However, I attempted to mimic the setup in SwiftUI SDK with no luck.
In ArcGIS Online:
1. I added a new item: URL -> ....WMTS....
2. Added the URL: https://api.maxar.com/streaming/v1/ogc/gwc/service/wmts?service=WMTS&request=GetCapabilities&version...
3. Custom parameter: maxar_api_token, <token>
4. Select a layer to add: Imagery, Matrix tile: EPSG:3857
5. Success
However, in iOS, not able to get the same results:
import SwiftUI
import ArcGIS
struct OverlayImagesView: View {
@State private var map: Map = {
let map = Map(basemapStyle: .arcGISStreets)
map.initialViewpoint = Viewpoint(
latitude: 39, longitude: -98, scale: 4e7
)
let url = URL(string: "https://api.maxar.com/streaming/v1/ogc/gwc/service/wmts?service=WMTS&request=GetCapabilities&version...")
var wmtsLayer = WMTSLayer(url: url!, layerID: "Imagery", tileMatrixSetID: "EPSG:3857", preferredImageFormat: TileImageFormat.png)
wmtsLayer.setCustomParameterValue("***********************", forKey: "maxar_api_token")
map.addOperationalLayer(wmtsLayer)
return map
}()
var body: some View {
MapView(map: map)
}
}
Builds and runs successfully but just shows basemap at all zoom levels