I have a JSON file which looks like the following:
{"posts":[{"Latitude":"53.38246685","lontitude":"-6.41501535"},
{"Latitude":"53.4062787","lontitude":"-6.3767205"}]}
and I can get the first set of latitude and lontitude co-ordinates by doing the following:
JSONObject o = new JSONObject(s);
JSONArray a = o.getJSONArray("posts");
o = a.getJSONObject(0);
lat = (int) (o.getDouble("Latitude")* 1E6);
lng = (int) (o.getDouble("lontitude")* 1E6);
Does anyone have an idea of how to get all the latitude and lontitude values ?
Any help would be much appreciated.