hello, we are trying to load Geoserver WMS link to AGSMapView. We are using AGSWMSlayer class but after loading the map is just navigating to that extent and not able to see the layer on the map. Could you please help me in this case?
code: -
let wmsServiceURL = URL(string:"https://mt-geospatial.com/geoserver/gissom_cp_test/wms")!
let wmsLayer = AGSWMSLayer(url: wmsServiceURL, layerNames: ["assets_cp_test"])
mapView.map?.operationalLayers.add(wmsLayer)
wmsLayer.load{ error in
if wmsLayer.loadStatus == .loaded{
self.mapView.setViewpointGeometry(wmsLayer.fullExtent!)
}
It seems the layer is loading fine, but there is no data. Can you double check if your service is serving data correctly? Below is a demo weather radar service from NOAA.
You may want to ask the questions about service in Publishing and Managing Services Questions or ArcGIS Enterprise Questions if it is data related.
let wmsServiceURL = URL(string:"https://nowcoast.noaa.gov/geoserver/observations/weather_radar/wms")!
let wmsLayer = AGSWMSLayer(url: wmsServiceURL, layerNames: ["base_reflectivity_mosaic"])
mapView.map?.operationalLayers.add(wmsLayer)
wmsLayer.load { error in
self.mapView.setViewpointGeometry(wmsLayer.fullExtent!)
}
Edit: it seems to display the red and gray labels on ArcGIS Online, so we are looking into it.