2

Here maps Premium SDK is used in project. I am drawing trips using polylines and markers on map.

I encountered a problem on some devices (in particular Mi 10 Pro, Android 9): If the trip is large and contains many points, map does not render properly (Screenshot below). What is the problem? And how can I fix it? Thank you. enter image description here

Marat Zangiev
  • 1,172
  • 7
  • 12

1 Answers1

1

It looks like this issue happens due to a lack of system memory (RAM).

You need to analyze the memory usage level from android.app.Activity#onTrimMemory callback and should stop adding objects to the map or remove objects that no longer needed when the level equals to:

android.content.ComponentCallbacks2#TRIM_MEMORY_RUNNING_MODERATE android.content.ComponentCallbacks2#TRIM_MEMORY_RUNNING_LOW android.content.ComponentCallbacks2#TRIM_MEMORY_RUNNING_CRITICAL - most likely the process will be killed soon if the app not released unneeded resources.