Google Geocoding stopped to work for Crimea, Ukraine

前端 未结 3 1593
醉梦人生
醉梦人生 2020-12-28 20:48

I\'ve discovered very strange issue. Geocoding API suddenly stopped to work for Crimea coordinates. Example: Simferopol city:

http://maps.googleapis.com/maps/api/ge

相关标签:
3条回答
  • 2020-12-28 21:05

    Yes, it's a restriction due to political events. I got this answer from Google Support:

    Since Crimea currently is a disputed territory (http://en.wikipedia.org/wiki/List_of_territorial_disputes), Geocoder results will currently not return results for reverse geocoding.

    0 讨论(0)
  • 2020-12-28 21:11

    Google (reverse) geocoding service stopped working for Crimea due to territorial dispute.

    A not-trivial, but future-proof technical solution is to create an abstraction API over geocoding services rather than using a specific service directly in your app.

    This way you reduce dependency on a specific service. For example, you can use Yandex geocoding service if the coordinates are within the bounding rectangle of Crimea:
    http://geocode-maps.yandex.ru/1.x/?geocode=34.104996,44.957844&lang=en-US

    Another benefit of an abstraction level is that you may very quickly switch to a different service if your "main" service goes down (for whatever reason).


    Please note that support of certain regions or countries by a software product may be subject to US / EU sanctions. Support of any region with a territorial dispute is a potential problem.

    0 讨论(0)
  • 2020-12-28 21:14

    Good news. As of January 2019 Google resolved an issue with ZERO_RESULTS in disputed areas.

    You can see that now they return results, but country name doesn't appear in responses. This aligns with approach that they had in forward geocoder. Disputed areas don't have country names.

    The following request now returns Simferopol

    https://maps.googleapis.com/maps/api/geocode/json?latlng=44.957844%2C34.104996&key=YOUR_API_KEY

    The same result in geocoder tool:

    https://developers-dot-devsite-v2-prod.appspot.com/maps/documentation/utils/geocoder/#q%3D44.957844%252C34.104996

    I hope this helps!

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