简体   繁体   中英

Google Map SDK unreasonable amount of memory used when using markers

I have a huge project, that has dozens of screens.

I had to include google maps into the project and show some markers on it.
The maximum number of markers is around 600, spread all over the town.

When I call this mapView, it increases memory consumption from 19 to 240mb. This is not reasonable at all, the app starts flooding with memory warnings and crashes soon.

What can I do to fix that?

iOS version is 7.1 and Google Maps SDK is 1.8.1

Each marker on Google Maps view has a bitmap. Adding marker creates a new bitmap for it. I believe you have a limited types of markers and this, can share the bitmap along them.

Another strategy could be combining close markers into one metamarker and then, while user zoom-in - expand this group.

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM