itZme
itZme

Reputation: 1439

WhatsApp like location sharing in iOS application

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

Answers (1)

Hemang
Hemang

Reputation: 27072

There's no direct feature available (except whatsapp developers), but here's an idea to do this

  1. Get user current location using CLLocationManager see this answer

  2. Refer this, https://developers.google.com/maps/documentation/staticmaps/

  3. You've to pass users latitude and longitude which you've to use to create static map image URL

  4. Load that URL in UIImageView in background (something like, SDWebImage)

  5. You've to setup your required UI for this.

Upvotes: 2

Related Questions