Finding the nearest city

459 views
Skip to first unread message

Rich

unread,
Nov 16, 2010, 10:43:32 AM11/16/10
to Google Maps JavaScript API v3, rvaz...@impactnews.com
I have a city based service that includes several small cities and a
coule of large metro areas.

Finding the nearest LatLng doesn't work to find out which city to put
someone in based on their address. As an example of my problem, I
live in the northern part of the large city and the "nearest city"
based on my LatLng is a nearby rural city because the center of
downtown is further away.

Is there a way to get the bounds of a whole city to find which border
is closest to me? I need to know if it's within a set of cities or
which boundaries it's closest to.

Even if I need to work from a list of boundary LatLngs to see which is
nearer, but I can't figure how to get those.

Esa

unread,
Nov 16, 2010, 11:52:30 PM11/16/10
to Google Maps JavaScript API v3
Geonames has a service like that
http://www.geonames.org/export/ws-overview.html
Reply all
Reply to author
Forward
0 new messages