检测空气中的位置 [英] Detecting location in air
本文介绍了检测空气中的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在空中时,我的手机应该可以检测到我在应用中的位置.是否可以使用Google或Apple Map检测位置?如果你们中有人遇到这种情况,请给我一些解决方案.
In my app location should be detected by my mobile when i am in air. Is it possible to detect location using google or Apple map? If anyone of you faced this scenario please give me some solution.
推荐答案
您可以尝试阅读 Google Maps Elevation API文档. JSON示例返回以下内容:
You can try reading Google Maps Elevation API documentation. The example JSON returns this:
{
"results" : [
{
"elevation" : 1608.637939453125,
"location" : {
"lat" : 39.73915360,
"lng" : -104.98470340
},
"resolution" : 4.771975994110107
}
],
"status" : "OK"
}
因此,您必须寻找海拔属性.然后,您询问海拔是否高于 X (X是考虑用户处于空中所需的高度),就可以了.
So, you have to look for the elevation attribute. Then, you ask if elevation is higher than X (Where X is the needed altitude to consider the user is in air), and you're done.
这篇关于检测空气中的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文