The calls for adding or removing a graphic take longer on android than they do on iOS.
This is due to a workaround what in some cases the map is not beeing refreshed and we therefore refresh the map manually.
|
updateMap().onSuccess { updateResult -> |
private fun onRemoveGraphic(call: MethodCall, result: MethodChannel.Result) {
/*Other code */
// Don't use removeAll because this will not trigger a redraw.
graphicsToRemove.forEach(defaultGraphicsOverlay.graphics::remove)
lifecycle.coroutineScope.launch {
updateMap().onSuccess { // <------
result.success(true)
}.onFailure { e ->
result.finishWithError(e)
}
}
}
The calls for adding or removing a graphic take longer on android than they do on iOS.
This is due to a workaround what in some cases the map is not beeing refreshed and we therefore refresh the map manually.
arcgis_map_sdk/arcgis_map_sdk_android/android/src/main/kotlin/dev/fluttercommunity/arcgis_map_sdk_android/ArcgisMapView.kt
Line 522 in aa37a15
updateMapafter we calledresult.successand ignore the error of that call