简体   繁体   中英

How to write geopoint data in firebase firestore in Flutter?

How to write GeoPoints data like this in Firebase Firestore in Flutter? 火库

I just want to simply store latitue and longitude data

There's a GeoPoint type provided by the Flutter Firebase library. You just do this:

final result = await FirebaseFirestore.instance
  .collection('waypoints')
  .add({
    'startPoint': GeoPoint(5.373982, 2.705164)
  });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM