Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void convertAddress() {
- Geocoder geoCoder = new Geocoder(this);
- if (alamat != null && !alamat.isEmpty()) {
- try {
- List<Address> addressList = geoCoder.getFromLocationName(alamat, 1);
- if (addressList != null && addressList.size() > 0) {
- lat = addressList.get(0).getLatitude();
- lng = addressList.get(0).getLongitude();
- }
- } catch (Exception e) {
- e.printStackTrace();
- } // end catch
- } // end if
- } // end c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement