GET /cities/findNearestCity
Finds the nearest RowCity given a latitude and longitude. This method queries all records
from the city table that are within a pretend fence around the latitude and longitude.
Roles that can access this endpoint are Users.
Parameters
name |
description |
type |
default |
type |
latitude |
the latitude of the point which we want to find nearest city |
query
|
|
String
|
longitude |
the longitude of the point which we want to find nearest city |
query
|
|
String
|
fence |
the number of degrees from the latitude/longitude to which we will limit the city search. fence values > 2 (App: 120 miles) are not allowed. |
query
|
.25 |
String
|
Result
RowCity
of type:
application/xml
application/json
the RowCity object for the nearest city using GreatCircleMath
For example, /cities/findNearestCity?latitude=42.434700&longitude=83.984700?fence=.25
would find a single city that is closest to the provided latitude and longitude within .25 degrees.
Note: Omitting the fence parameter will default to .25 (App: 15 miles).
Try It Out
Request