GPS location on iOS and Android

旧巷老猫 提交于 2019-12-30 14:41:53

问题


I have limited experience programming Android apps and none at all for iOS. Part of a future project of mine is to make my app be able to record the current location using GPS possibly on both Android and iOS.

Can the GPS coordinates be taken in "Universal Transverse Mercator" format like in Google Earth for both platforms? If not, is there some way to calculate the coordinates to this format?

EDIT: Any chance anyone would know what format the functions in their respective APIs return?


回答1:


The API will provide a location object (class Location for Android and CLLocation for iOS). Both API have getters for latitude and longitude, which are floats. Latitude and longitude are the GPS coordinates wrt to the WGS84 reference elipsoid.

If you need to transform these into some other coordinate system there should be lots of references in the web.



来源:https://stackoverflow.com/questions/11956423/gps-location-on-ios-and-android

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