Closed saoron closed 6 years ago
For the types, you should import from firebase.
import * as firebase from 'firebase/app'
...
let point = new firebase.firestore.GeoPoint(32.5522, 34.556656)
The jamesdaniels solution didn't work with me, any suggestions what might be the problem?
I'm getting error
TypeError: Cannot read property 'GeoPoint' of undefined
I'm using: "angularfire2": "^5.0.0-rc.8.0", "firebase": "^5.0.2",
This is different in 5.0 now, you should do:
import { firestore } from 'firebase/firestore';
...
new firestore.GeoPoint ...
You are correct, GeoPint
is not implemented. 🍻
I use this to make the GeoPoint work import { firestore } from 'firebase';
let point = new firestore.GeoPoint(32.5522, 34.556656);
Hi what is the recommended way to import these classes?
There are different answers here.
Hi @jamesdaniels I am confused.
What is the correct way to import?
import { firestore } from 'firebase/firestore';
...
new firestore.GeoPoint ...
does not work
Version info
Angular: 5.2.x
Firebase: ^4.8.2
AngularFire: 5.0.0-rc.7
Description
AngularFire doesn't have GeoPoint interface
Expected behavior
Actual behavior
TypeError: Cannot read property 'GeoPoint' of undefined
More info
Firebase JS reference: https://firebase.google.com/docs/reference/js/firebase.firestore.GeoPoint