I am trying to find out nearest airport code using latitude and longitude. I find URL which give me nearest airport:
http://airports.pidgets.com/v1/airports?near=40.1584,-74.9732
but problem is that this URL give 8 airports codes. How can i find out nearest airport within this 8 airports code.
Any suggestion.
The <dist>
is included, and appears to be in ascending order. So: take the first.
If you don't trust it, compute the great arc distance ;p
The resulting XML gives you a <dist>
node which appears to give you the distance. So just take the one with the lowest <dist>
value (seems to be ordered, so take the first).
你见过从xml返回的距离节点吗?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.