Skip to content

Instantly share code, notes, and snippets.

@pratamawijaya
Created February 20, 2015 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pratamawijaya/023a643ecd948d75f698 to your computer and use it in GitHub Desktop.
Save pratamawijaya/023a643ecd948d75f698 to your computer and use it in GitHub Desktop.
private List<LatLng> readDataFromDB(String id) {
RealmResults<LocationModel> result = realm.where(LocationModel.class).equalTo("id", id).findAll();
List<LatLng> listlatlng = new ArrayList<>();
for (LatLngModel data : result.get(0).getLatLngRealmList())
listlatlng.add(new LatLng(data.getLat(), data.getLng()));
return listlatlng;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment