How to email CLLocationCoordinate2D as a link

感情迁移 提交于 2019-12-13 02:36:47

问题


I am trying to emulate the Maps 'Share Location' via email functionality.

I have the latitude and longitude of my location and am currently using it to display the location on a map via MKMapView.

I also have functionality that composes an email from the app and I would like to include the location in it but can not figure out how to construct a link, using the longitude and latitude.

I have seen other apps with apps with this functionality so I know it is possible.

Any help would be much appreciated.

Thanks in advance.

UPDATE:

The link should open Google Maps.


回答1:


Where should it link to? Your app or Google Maps? For the latter, check out the Apple URL Scheme Reference. For the former, you have to construct your own URL scheme and then create a string that matches your scheme.



来源:https://stackoverflow.com/questions/2963132/how-to-email-cllocationcoordinate2d-as-a-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!