Understading google geocoding service component filters -


i testing components filters when came across not expecting: using filter improve results of queries. address tested "avenida de almirante reis, 61 c/v.d, lisboa".

without filter result point locality, while if add country filter point exact address.

which leads me doubt knowledge on filters. modification filter should reduce set of answers, not change it, happens in case.

i know because i'm using google's geocoding service , need explain (to degree) why results get, means understanding behaviour.

thanks in advance.

no , yes.

component filters meant restrict results, not change them. both examples return country now, these work:

http://maps.googleapis.com/maps/api/geocode/json?address=avenida%20de%20almirante%20reis,%2061%20lisboa http://maps.googleapis.com/maps/api/geocode/json?address=avenida%20de%20almirante%20reis,%2061%20lisboa&components=country%3apt

however, see note in component filtering documentation:

note: each address component can specified either in address parameter or component filter, not both. doing may result in zero_results.

it seems ok repeat country, 2nd link works, although according note it'd better use this:

http://maps.googleapis.com/maps/api/geocode/json?address=avenida%20de%20almirante%20reis,%2061&components=country%3apt

but if same street name, result in zero_results:

http://maps.googleapis.com/maps/api/geocode/json?address=avenida%20de%20almirante%20reis,%2061%20lisboa&components=country%3apt%7aroute%3aavenida%20de%20almirante%20reis


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -