private Marker processJSONObject(JSONObject jo) { if (jo == null) throw new NullPointerException(); if (!jo.has("geometry")) throw new NullPointerException(); Marker ma = null; try { Double lat = null, lon = null; if (!jo.isNull("geometry")) { JSONObject geo = jo.getJSONObject("geometry"); JSONArray coordinates = geo.getJSONArray("coordinates"); lon = coordinates.getDouble(0); lat = coordinates.getDouble(1); } if (lat != null) { String user = jo.getString("id"); ma = new IconMarker(user, lat, lon, 0, Color.RED, icon); } Log.i("point", lon + ", " + lat + ": " + ma.getName()); } catch (Exception e) { e.printStackTrace(); } return ma; }