Is there a Google Maps equivalent for mkmapsnapshotter?

I have UITableView

one that can potentially contain a large number of cells, and in some cells I want to UIImageView

show a location map whose coordinates are only known at runtime.

I want the table view to scroll smoothly and I want the cards in the cells to not scroll at all.

I was asked to avoid Apple Maps. Also, MKMapSnapshotter

- iOS 7 and above. I have to support iOS 6.

So, is the Google Maps Image API my best option?

I am already using Google Maps iOS SDK , so I would like to use it for this if possible. But does it have this function? Equivalent MKMapSnapshotter

? I'm surprised I can't find it in the documentation.


source to share

2 answers

There was a class in the SDK GMSScreenshot

that could be used for screenshots. However, in version 1.2 Google removed this as you could use renderInContext

. You can see some reference information and sample code here:

Google Maps IOS SDK 1.2 requires a map display snapshot

GMSMapView screen capture issue in Google Maps SDK for iOS

I think renderInContext

(and GMSScreenshot

before it) is for taking a screenshot with a map view that is already in the view, has been displayed for a while, loaded map slices, etc. m not sure if it will work well if you have created a map view in the background, set the camera position to the lat / lon you want, map it to the image and then repeat for other locations you want.

So, I suspect the Google Maps Imaging API will work better for what you are doing.



Why aren't you using google maps static api

they are made for this kind of purpose.



All Articles