WhatsApp喜欢iOS应用程序中的位置共享 [英] WhatsApp like location sharing in iOS application
问题描述
我想从我的iPhone应用程序分享用户的当前位置。并计划显示接收位置的预览屏幕,例如WhatsApp应用程序中的位置共享功能。
iOS中是否有MapKit或Google Map的内置功能?
有什么建议?
没有可用的直接功能whatsapp开发人员),但有一个想法可以做到这一点
$ b $ ol
使用获取用户当前位置CLLocationManager
请参阅此 https://developers.google.com/maps/documentation/staticmaps/
您必须传递用户经纬度,您必须使用它来创建静态地图图像URL
在 UIImageView
后台加载该URL(类似于 SDWebImage )
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?
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 answerRefer 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.
这篇关于WhatsApp喜欢iOS应用程序中的位置共享的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!