Google Geocoding stopped to work for Crimea, Ukraine

前端 未结 3 1657
醉梦人生
醉梦人生 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: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.

提交回复
热议问题