Google maps api limit search

1 view
Skip to first unread message

Vinicius Vaz via StackOverflow

unread,
Apr 23, 2015, 9:12:00 AM4/23/15
to google-appengin...@googlegroups.com

I am developing an application for a specific city and like it when the User typed the street it suggested some related names, this part I got, I'm using AutoComplete.js but would limit the search that city, without showing the others. I searched the documentation but did not quite understand, I can limit po zip code, city name or something?

$("#InputEndereco").autocomplete({
        source: function (request, response) {
            geocoder.geocode({ 'address': request.term + ', Brasil', 'region': 'BR' }, function (results, status) {
                response($.map(results, function (item) {
                    return {
                        label: item.formatted_address,
                        value: item.formatted_address,
                        latitude: item.geometry.location.lat(),
                        longitude: item.geometry.location.lng()
                    }
                }));
            })
        }
    });


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/29824415/google-maps-api-limit-search
Reply all
Reply to author
Forward
0 new messages