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
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
https://developers.google.com/maps/documentation/ios/releases#version_12_-_april_2013
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.
source to share
Why aren't you using google maps static api
https://developers.google.com/maps/documentation/staticmaps/
they are made for this kind of purpose.
source to share