This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Android and the fly likes need to find distance between given two cities Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "need to find distance between given two cities" Watch "need to find distance between given two cities" New topic
Author

need to find distance between given two cities

sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1071
I need to find thedistance between two cities?
I have two names of cities. EX Colombo & Galle
I need to write a programe to show these cities google map and need to draw a line between two cities.Also i need to calculate the distance?
can anyone tell me the way or give me simple example.I search through internet.Still not get good one.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Find their latitudes and longitudes. Then implement a calculation which finds the distance between the two lat-long pairs. (That calculation CAN be found on the internet.)
sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1071
can you tell me how to get longitudes & latitudes of a given citi?
sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1071
this is my class


This is my xml file



Can anyone tell me why it is giving error ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need to find distance between given two cities
 
Similar Threads
how to use distanceBetween built in methog
Measure distance between two cities ?
Math.sqrt() 1000x slower on Solaris than Win?
calculating distance between cities
Graphs: Breadth First or Depth First?