How do I calculate the distance between two coor开发者_高级运维dinates in Google map on BlackBerry?
No need to use Google map for getting distance of two cities. All you need to have is getting latitude and longitude of two cities. This is how I did. Coordinates is native Blackberry class
Coordinates ahmedabad=new Coordinates(23.03333,72.61667, Float.NaN);
Coordinates delhi=new Coordinates(28.66667,77.21667, Float.NaN);
dist=ahmedabad.distance(delhi);
You could try following code:
from geopy.distance import geodesic
ahmedabad = (23.03333,72.61667)
delhi = (28.66667,77.21667)
print(geodesic(origin, dest).meters)
print(geodesic(origin, dest).kilometers)
print(geodesic(origin, dest).miles)
精彩评论