我想将json值传递给onMapReady方法。但是当我将值传递给onMapReady时,我得到空值。
protected void status(){
try {
JSONArray peoples = new JSONArray(myJSON);
JSONObject c = peoples.getJSONObject(0);
lati = c.getDouble("latitude");
loni = c.getDouble("longitude");
}catch(Exception e)
{
e.printStackTrace();
}
}
public void onMapReady(GoogleMap googleMap) {
googleMaap = googleMap;
//I want to get value of lati && loni here here
}