diff --git a/README.md b/README.md index 8b650f1..08dc74e 100644 --- a/README.md +++ b/README.md @@ -99,19 +99,20 @@ Internally GeoFirestore creates multiple geohashes around a requested area. It t ### Data Structure -GeoFirestore is based off of the `geofire` JavaScript library. Documents generated and stored in your Firestore collection by GeoFirestore are typed/structured as: +Documents generated and stored in your Firestore collection by GeoFirestore are typed/structured as: ```TypeScript interface GeoDocument { - g: string; - l: GeoPoint; - d: DocumentData; + g: { + geohash: string; + geopoint: GeoPoint; + }; + [field: string]: any; } ``` -- `g` is the geohash generated by the library, and is required in order to make the geoqery. -- `l` is the GeoPoint used to generate the `g` field. -- `d` is a sub-object which is where your data is stored. +- `g.geohash` is the geohash generated by the library, and is required in order to make the geoqery. +- `g.geopoint` is the GeoPoint used to generate the `g.geohash` field. Data must be structured this was in order to work, and is why you should use the GeoFirestore library to insert data in order to be able to query it.