Hi, we are creating an empty map with a spatial reference of wkid 4326, and then add a wmsLayer as well as a feature collection layer. With the wkid 4326, features and map is displayed nicely but when we change the wkid to 3857, only the new wms layer shows correctly and all features from poiFeeatureCollectionLayer are created at lat=0, lon=0.
We use a constant for the spatial reference, so that I'm sure to have changed the spatial reference everywhere. I furthermore validated, that the lat and lon values we get from the backend are set correctly.
Do you suspect any error in my setup? I do not really understand why changing the spatial reference sets the features position to [0,0].
val wmsLayer = WmsLayer(Endpoints.WMS_LAYER_URL, listOf(Endpoints.WMS_LAYER_NAME))
mapView.map = ArcGISMap(SPATIAL_REFERENCE)
wmsLayer.load()
.onSuccess {
Timber.d("WmsLayer loaded with status ${wmsLayer.loadStatus.value}")
wmsLayer.let {
Timber.d("There are ${wmsLayer.layerInfos.size} wms layers")
mapView.map!!.apply {
operationalLayers.add(wmsLayer)
operationalLayers.add(poiFeatureCollectionLayer)
}
}
}
.onFailure {
Timber.d("Wms Layer load failed with status ${wmsLayer.loadStatus.value}")
}