【发布时间】:2018-09-28 19:40:54
【问题描述】:
这是我的代码。但不工作。我得到空值。
我只想得到纬度经度值..
mLocationRef = FirebaseDatabase.getInstance().getReference().child("districsubdepot").child("Jaffna");
mLocationRef.addChildEventListener(new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
Double lt = (dataSnapshot.child("latitude").getValue(Double.class));
Double lo=(dataSnapshot.child("logitude").getValue(Double.class));
Toasty.success(getApplicationContext(), "value" + lt+lo).show();
}
}
最后我想用这些纬度经度画折线。该怎么做?
【问题讨论】:
标签: java android firebase firebase-realtime-database