Google maps API. Get continent where the country is located

后端 未结 5 1541
灰色年华
灰色年华 2021-02-09 23:51

There is a simple query to google API

https://maps.googleapis.com/maps/api/geocode/json?address=&components=country:Russia&language=ru&key=MY_API_KEY

5条回答
  •  我寻月下人不归
    2021-02-10 00:17

    Use the OpenCage Geocoder API service, it has continent has one of its values.

    https://geocoder.opencagedata.com/api

    Possible values of _type include (but are not limited to): building, road, village, neighbourhood, city, county, postcode, state_district, state, region, island, country, continent, ficticious, unknown

提交回复
热议问题