ben_ng 发表于 2022-9-25 07:59:06

如何调用openstreetmap

如何调用openstreetmap

PLA 发表于 2022-9-25 08:10:42

List<Address> addresses;
geocoder = new Geocoder(this, Locale.getDefault());
addresses = geocoder.getFromLocation(latitude, longitude, 1);
String address = addresses.get(0).getAddressLine(0);
String city = addresses.get(0).getAddressLine(1);
String country = addresses.get(0).getAddressLine(2);

为openstreammap final String requestString = " CodeGo.net+
Double.toString(lat) + "&lon=" + Double.toString(lon) + "&zoom=18&addressdetails=1";
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(requestString));
try {
页: [1]
查看完整版本: 如何调用openstreetmap