Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting distance using Google Maps API

 
Shaahid Vawda
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I'm a student and I am doing a school project .

I need a way to calculate the distance between two addresses using the google maps API
I've only found ways to do it in javascript ,but I need a way to do it in java
Any suggestions ?




Thanks in advance
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So why can't you translate the Javascript code into Java code?

I'm assuming you've already used the Google API to convert the addresses to latitude/longitude values; if you have Javascript code to find the distance between two of those, the Java code should be pretty similar. On the other hand, if my assumption is incorrect, then it would help for you to provide a more complete description of your problem.
 
Shaahid Vawda
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For my assignment I need to develop a program for a courier service
In my program i want to enter an address and get a distance to a particular address from a predefined address.

 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see. Then does that mean "I haven't done anything at all and I was hoping somebody else would do it for me"? Surely not! Tell us what you have done, and tell us what you can't do and what you have tried so far.
 
Shaahid Vawda
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you at least point me out in the right direction ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic