2

I'm kinda new to the whole GIS thing, and found that is necessary for onw of my web apps. It's come to my attention that some people don't know what a proper physical address looks like, and so I'd like to make life a little easier.

I have an app that requests a person's physical address. Instead of typing in the full thing, I'd like to use an autocomplete service. I'm in South Africa, so AfriGIS seems to be the best bet. However, I can't seem to find a service that will autocomplete an address for me, and split that same address (result) into it's parts. For example, in JSON:

{
    'address': {
        'streetNumber': 12,
        'streetName': 'Main Street',
        'suburbTown': 'Kensington',
        'city': 'Johannesburg',
        'province': 'Gauteng'
        'streetCode': '2094',
        <etc>
    }
}

Are there any services that support this functionality (for South Africa, of course)?

Update:

This is very close to what I'm looking for: https://google-developers.appspot.com/maps/documentation/javascript/examples/full/places-autocomplete-addressform

However, it is not very accurate in terms of complete addresses. In the above case, Google will not return the suburb. In South Africa, suburbs are areas, and not city outskirts. Also, the Zip codes it returns are wrong.

1

If you had the data yourself then there are many javascripts and jquery libraries that do autocomplete like these

http://jqueryui.com/autocomplete/

But one of the best examples I have seen recently is Bryan McBride's Bootleaf demo which is here

http://bmcbride.github.io/bootleaf/

If you use the search box and the top and start typing Museums you will see an autocomplete list with graphics and if you pick one it zooms the map. This data comes from a geojson file which is searched by using an automcplete javascript library called TypeAhead that Twitter released as part of Bootstrap but there is also a standalone version.

http://twitter.github.io/typeahead.js/

However, if you do not have the data yourself then there are standard geocoding services from Google, yahoo, Bing that you could put a jquery wrapper around to help with the autocomplete

  • I already have the components needed for auto-complete - I actually wrote my own components ans plugins. What I'm really after is the API side of things. Addresses are always different. Some are longer than others. As such, I cannot manually break the address into its parts - I'd need a web services to do that for me. – Mike Rockétt Oct 10 '13 at 10:47
0

If you'd only need city level autocomplete, i think the Teleport API would work: http://developers.teleport.org/api/autocomplete_widget/

You can get a lot of extra info on the cities returned as well (like population, country, state, life quality data and even a photo you can use on your site)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.