Skip to content

Android: updateMap() calls in removeGraphic delays method call result #97

@JulianBissekkou

Description

@JulianBissekkou

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.

    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

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions