Search code examples
iosswiftgoogle-mapsuser-interfacegoogle-maps-sdk-ios

Overlay image failing to load on GoogleMaps - iOS


I'm facing an issue when using an image as a ground overlay. The first few times with a fresh install the image loads fine and after it doesn't display at all. For some context: I have a list of images and when tapping on one it displays the image and markers on top of the map. The second time I do it the image fails to load.It seems to be a memory/caching issue but haven't been able to find a solution.

Currently using GoogleMaps SDK Version 8.1.0

Any idea what could it be?


Solution

  • Ran into the same using 8.0.0 on iOS via Cocoapods. After some digging, I found that despite the image supplied is valid and the GMSGroundOverlay is properly added to the map, it occasionally disappears during runtime.

    it turns out that when we used an earlier version (4.1.0), this wasn't happening. I tested my way up to at least 5.1.0 where this issue wasn't happening any more for me. If this is the issue you're having... not really offering a cause, but a solution at least.