Hello,
I was following the tutorial but cannot seem to query the dataset./
It must also be noted that you cannot save the data as an object type anymore in firestore so I saved the data as a geo-point.
I am using the following two options:
Option 1)
I declare the following in the ngOnInit lifecycle hook:
I declare the following in the ngOnInit lifecycle hook:
"const center = new firestore.GeoPoint(51.5249949, -0.7466908)
this.points = this.radius.pipe(
switchMap(r => {
return this.geo.query('positions').within(center, r, field)
}))"
The following error message appears under the center parameter in the within():
"Argument of type 'GeoPoint' is not assignable to parameter of type 'FirePoint'
Type 'GeoPoint' is missing the following properties from type 'FirePoint': geopoint, geohash"
Hello, I was following the tutorial but cannot seem to query the dataset./ It must also be noted that you cannot save the data as an object type anymore in firestore so I saved the data as a geo-point.
I am using the following two options: Option 1)
I declare the following in the ngOnInit lifecycle hook:
"const center = this.geo.point(51.5249949, -0.7466908); this.points = this.radius.pipe( switchMap(r => { return this.geo.query('positions').within(center, r, field) }))"
The following error appears in the chrome console log
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'GeoPoint' of undefined TypeError: Cannot read property 'GeoPoint' of undefined
Option 2)
I found the following github repo which referenced the error message above: https://github.com/angular/angularfire/issues/1604
I declare the following in the ngOnInit lifecycle hook:
"const center = new firestore.GeoPoint(51.5249949, -0.7466908) this.points = this.radius.pipe( switchMap(r => { return this.geo.query('positions').within(center, r, field) }))"
The following error message appears under the center parameter in the within():
"Argument of type 'GeoPoint' is not assignable to parameter of type 'FirePoint' Type 'GeoPoint' is missing the following properties from type 'FirePoint': geopoint, geohash"