Google Geocoding returning totally different result from Google Map

前端 未结 2 1951
故里飘歌
故里飘歌 2020-12-21 08:02

For the location of

Charles La Trobe P-12 College,Victoria,Australia

Google maps produce the exact location of said college.

However, when requested

相关标签:
2条回答
  • 2020-12-21 08:17

    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

    0 讨论(0)
  • 2020-12-21 08:36

    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
    
    0 讨论(0)
提交回复
热议问题