fluttercommunity / fluttercommunity/arcgis_map_sdk
Android: updateMap() calls in removeGraphic delays method call result
- Dominant language
- JavaScript
- Stars
- 16
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
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.
https://github.com/fluttercommunity/arcgis_map_sdk/blob/aa37a155fa8a820aa73268ac1b711be4dfb8fb12/arcgis_map_sdk_android/android/src/main/kotlin/dev/fluttercommunity/arcgis_map_sdk_android/ArcgisMapView.kt#L522
```kotlin
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)
}
}
}
```
- [ ] See if this workaround is still required after the recent arcgis update
- [ ] If its required, run `updateMap` after we called `result.success` and ignore the error of that call
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.