Reputation: 1439
I want to share user's current location from my iPhone application. And plan to show a preview screen of recieved location, like location sharing feature in WhatsApp application.
Is there any in-built functionality available with MapKit or Google Map in iOS.
Any suggestions?
Upvotes: 0
Views: 2402
Reputation: 27072
There's no direct feature available (except whatsapp developers), but here's an idea to do this
Get user current location using CLLocationManager
see this answer
Refer this, https://developers.google.com/maps/documentation/staticmaps/
You've to pass users latitude and longitude which you've to use to create static map image URL
Load that URL in UIImageView
in background (something like, SDWebImage)
You've to setup your required UI for this.
Upvotes: 2