views:

9

answers:

0

I'm trying to create a Javascript function that would take a typed-in address, and calculate the distance to five fixed points using the Google Maps API.

Basically it wouldn't even show the Google Map, but rather show a simple number of miles (rounded to the tenths place) that would represent the distance from their specified address to fixed location, but for five different fixed locations.

For an example, you could type in "NYC", and it would show as follows:

Point A: 5.12 miles
Point B: 3.20 miles
Point C: 0.45 miles
Point D: 2.22 miles
Point E: 1.01 miles

How would I set up such locations, and then how would I create a function such as this?

Thanks in advance.