onDestroy

Releases resources to prevent memory leaks.

Stops camera animations and tile downloads and closes the HTTP client. Called when the view is detached from its window or its lifecycle owner is destroyed. Calling it more than once is safe, and the map keeps working afterwards: tiles that were still loading are requested again on the next draw.