@HVN Thanks for bringing this up, it seems like there is a bug with LocationDisplay.mapLocation not updating after the first location update. We have logged this and will provide a fix in the next release.
You could instead retrieve the location from the LocationDisplay.location Stateflow, collect the location changes and convert the given location to MapView's projection using GeometryEngine. Essentially, giving you the same value as the "mapLocation".
// start the location data source...
lifecycleScope.launch {
locationDisplay.location.filterNotNull().collect { location ->
// Get the map location using the same projection as the MapView
val mapLocation = GeometryEngine.projectOrNull(
geometry = location.position,
spatialReference = mapView.spatialReference.value ?: SpatialReference.webMercator()
)
}
}