1

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

Dvole
  • 5,725
  • 10
  • 54
  • 87
  • 1
    Hey man, didn't really think it was worth an answer as it's just a link but have you tried 'fusion tables'- http://stackoverflow.com/questions/9944585/adding-thousands-of-markers-google-map-api-v3 – Ben Aug 20 '15 at 08:58
  • are all of your markers always on screen? – Prisoner Aug 20 '15 at 09:04
  • You should try clustering and only show individual markers when the zoom levels are high. – radu-matei Aug 21 '15 at 07:04

1 Answers1

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.

Dmitry Valetin
  • 375
  • 2
  • 6