在Android中,我有国家的ISO代码。 我想从该国家获得纬度/经度坐标。
我正在使用Google Maps API。
我如何获得坐标?
答案 0 :(得分:2)
AFAIK Google地图中没有API。
但你可以使用:https://developers.google.com/public-data/docs/canonical/countries_csv
您可以使用这些值创建HashMap。
Map<String, LatLng> countries = new HashMap<String, LatLng>();
countries.put("PL", new LatLng(51.919438, 19.145136));
稍后您可以像这样使用它:
countries.get("PL"); // returns LatLng(51.919438, 19.145136)