Best ways to collect location-based user input
Posted
by
user359650
on Pro Webmasters
See other posts from Pro Webmasters
or by user359650
Published on 2012-03-18T11:01:55Z
Indexed on
2012/03/18
18:22 UTC
Read the original article
Hit count: 345
I'm working on a website where users will be able to register and provide information about their location. In order to prevent users from inputting incorrect data, we don't want users to provide free-text information but instead choose from predefined values as much as possible. We believe there are 2 ways of providing those values: use an API
to an external service provider or create your own local database
.
APIs
Some resources:
- https://developers.facebook.com/docs/reference/ads-api/get-autocomplete-data/
- http://developer.yahoo.com/geo/geoplanet/
Pros:
-accuracy and completeness of data.
-no maintenance related to update of data as this it taken care of by API provider.
-easier/faster to get started (no need to create local database, just implement API).
Cons:
-degradation of performance when availability issues with external API.
-outage due to changes to the external API (until your code is updated to reflect those changes).
-lock-in with external provider.
Local database
Some resources:
- http://developer.yahoo.com/geo/geoplanet/data/
- http://www.maxmind.com/app/geolitecity
- http://download.geonames.org/export/dump/
Pros:
-no external dependency: improved stability and performance.
Cons:
-more work to get started (you need to create the database and code to interact with it).
-risks of inaccurate/incomplete data, either initially or over time.
-more maintenance work to keep database up to date.
Assuming the depth information requested from users is as follows:
-country: interested in value. also used to narrow down list of regions.
-region (state in the US, county in the UK...): not interested in value itself, only used to narrow down list of cities.
-city: interested in value (which can be used to work out related region should we need regional statistics).
-address: interested in value although OPTIONAL.
Which option (whether API
or local database
) would you choose? What tips you would give for the implementation? What other resources can you share?
© Pro Webmasters or respective owner