How to get Firestore GeoPoint value in nested Object?
问题 Here is my temporary code for generate geopoint datatype from Firestore DB firestoreDb.collection("products").document(productId).get() .addOnSuccessListener(documentSnapshot -> { Products products = documentSnapshot.toObject(Products.class); countryCode = Objects.requireNonNull(products.getAddress().get("countryCode")).toString(); String stringGeoPoint = products.getLocation().get("geoPoint").toString(); System.out.println(stringGeoPoint); //Output: GeoPoint { latitude=29.339555, longitude