Question

For the location of

Charles La Trobe P-12 College,Victoria,Australia

Google maps produce the exact location of said college.

However, when requested via GEOCODE API, either http://maps.googleapis.com/maps/api/geocode/json?address=Charles+La+Trobe+P-12+College,Victoria,Australia&sensor=false

or on their demo page https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple

the address above gets a result thats far, far from the exact location.

any ideas?

Was it helpful?

Solution

The entry on Google Maps is a "place" not a geocoded result.

Charles La Trobe P-12 College
235 Kingsbury Dr, Macleod Victoria 3085, Australia ‎
+61 3 9223 1400 ‎ · vic.edu.au 

The Places API finds the correct location (as the first result). The geocoder returns a result for Victoria, Australia (-37.4713077, 144.7851531), which is the best "address" it can find in the string you gave it.

http://www.geocodezip.com/v3_example_geo2.asp?addr1=Charles%20La%20Trobe%20P-12%20College,Victoria,Australia&addr2=Charles%20La%20Trobe%20P-12%20College,Victoria,Australia&place=1&geocode=2

OTHER TIPS

After reading through lot of answers i came across this solution that Gecoder is used to find the nearest postal addresses.To get Local Business Data use Google Places API

https://developers.google.com/places/web-service/search#PlaceSearchRequests

it can be done like this

https://maps.googleapis.com/maps/api/place/textsearch/json?query=someplacename&key=key
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top