Closed wjrosa closed 6 years ago
What version of Firebase are you using?
Like how are you instantiating the Geofirestore object?
Are you using AngularFire?
(Can you show more code)
Also, version 2 is not directly compatible with 1. There have been significant changes in how data is being returned (mind you those changes shouldn't have caused this error)
I am sorry. It was my mistake!
I was trying to use this:
constructor(private db: AngularFirestore) { const geoFirestore = new GeoFirestore( this.db.collection('geofirestore') ); }
Instead of this (like you informed in the docs):
const collectionRef = firebase.firestore().collection('geofirestore'); const geoFirestore = new GeoFirestore(collectionRef);
It looks like the output is different.
Yea, AngularFirestore
returns a AngularFirestoreCollection
type, you need a firebase CollectionRef
try this...
constructor(private db: AngularFirestore) { const geoFirestore = new GeoFirestore( this.db.collection('geofirestore').ref ); }
Hi! I am trying to use the query like this:
... const geoFirestoreQuery = geoFirestore.query({ center: new firebase.firestore.GeoPoint(1, 2), radius: 10 });
Then I get this error:Am I doing something wrong? I tried to use versions 1.2.0 and directly from the v2.0.0 branch. Thank you!