Recieving a 403 forbidden error when using latitude and longitude: geocoding

前端 未结 2 1262
灰色年华
灰色年华 2020-11-30 14:38

Our site has the option to insert your postcode in, which in turn works with geocoding to work out the latitude and longitude.

This code has not been changed for ye

相关标签:
2条回答
  • 2020-11-30 14:53

    The version 2 Geocoding API was turned off September 9th as announced...

    From Upgrading Your Geocoding API Application To v3

    Version 2 ("v2") of the Geocoding API was officially deprecated on 8 March 2010 and has now been turned down. As of 9 September 2013 the v2 API will no longer work.

    0 讨论(0)
  • 2020-11-30 14:58

    Copy of my answer to: this duplicate question

    Api v2 was closed down on sept 13, 2013. Your question was asked on 14th - so that migh be a clue. What I managed to do is simply modify URLs in googlemaps.py

    I changed _DIRECTIONS_QUERY_URL (line 165 of googlemaps.py) to:

    _DIRECTIONS_QUERY_URL = 'http://maps.googleapis.com/maps/api/directions/output?'
    

    And it worked fine. Also I tried modiying line 164: _GEOCODE_QUERY_URL = 'http://maps.googleapis.com/maps/api/geocode/output?' as suggested here but there's some error, and a) I don't need it anyway b) it's already covered by pygeocoder which is a bit more advanced that googlemaps.py

    0 讨论(0)
提交回复
热议问题