hoangtrungweb / gmaps-samples

Automatically exported from code.google.com/p/gmaps-samples
0 stars 0 forks source link

Radius of "m" not functioning in college-finder/SearchService.js #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

For college-finder/index.html, the documentation shows units of measureas 
"m", "miles" or "km".  In the SearchService.js however, only "miles" and 
"km" are supported -- and using just "m" will not work.

From the comments:
 *   <li>radius {string}: A distance specified as '<number> <units>' 
representing
 *       the distance from the specified address or latLng to search. Valid
 *       values for <units> are 'm', 'km', or 'miles'.

Note, the condition where (units == 'm') is not addressed in the following 
code:

    // Convert radius to meters.
    if (units == 'km') {
      radius *= 1000;
    } else if (units == 'miles') {
      radius *= 1609.344;
    }

Original issue reported on code.google.com by sgorn...@gmail.com on 28 Dec 2009 at 11:13