How to limit geocoding to addresses in ONE city
h@r@ld - April 9, 2008 - 21:59
| Project: | Google Client Geocoder |
| Version: | 5.x-0.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | xmarket |
| Status: | active |
Jump to:
Description
My drupal site needs to geocode addresses, in only one single city.
If a user tries to geocode e.g. "Longstreet 123", a location in the wrong city is normally picked. However, if the city name and country name attached after street name, the correct address is retrieved. E.g. "Longstreet 123, Smallville, Republic of Abzurdistan".
Is it possible in GCG to set the trailing city name and country name as a constant for all searches? In my fictitious example add the string
", Smallville, Republic of Abzurdistan" to all addresses before being sent to Google for geocoding?

#1
You could hardcode the values into the code and pass them as hidden input types. As soon as I have a few minutes I'll try that and report back...
Ricardo
#2
Country restriction will be supported by address, geocoded address and geocoded address marker fields.
City restriction won't be supported in the near future.