F
F
frommysience2019-04-24 11:51:09
Java
frommysience, 2019-04-24 11:51:09

Why might MapView not respond to marker updates?

Hello.
A strange bug has come out - if the application has been minimized for a long time, then after it is expanded, MapView does not react to updating markers in any way (for example, if the set of markers has changed).
Moreover, if it was curtailed for a short time - everything works in the normal mode.
I suspect that the matter is in some features of the MapView life cycle, tk. manually calling mvMap.invalidate() did nothing.
What do you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Varakosov, 2019-04-24
@frommysience

Most likely, you lose the marker objects, so you can neither delete nor update them. Explicitly clear the map in onPause() and restore its state in onResume().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question