Closed rtman closed 6 years ago
Ok so I got it working.
What works is the following, so the docs should be changed to GeoPoint
:
new firebase.firestore.GeoPoint(latitude, longitude)
Ah that's something which changed while Firestore was still being developed. I'll get it updated.!
Did something change?
import firebase from '@firebase/app';
require('@firebase/firestore');
const location = new firebase.firestore.GeoPoint(this.state.latitude, this.state.longitude);
This gives me an error:
__WEBPACK_IMPORTED_MODULE_1__firebase__.a.firestore.GeoPoint is not a constructor
Versions:
firebase: ^5.4.2
react: ^16.5.0
Hey,
Just trying to get the
geoPoint
datatype working and I am having trouble. I have tried searching around and found very little information on the correct usage of this.Here's my code
This throws the following error:
_reactNativeFirebase2.default.firestore.geoPoint is not a function
I see that in the firestore docs it is
new GeoPoint(latitude, longitude)
, so I'm wondering if it should be the same inRNFirebase
?Currently what I see in the docs here is
firebase.firestore.geoPoint
andgeoPoint(latitude, longitude);
Which is how I got to my current code.So can someone who knows let me know the proper usage with RNFirebase?
Thanks!
Environment
Application Target Platform: Android
Development Operating System: Windows 10
Build Tools:
React Native version: 0.49.3
RNFirebase Version: 3.0.6
Firebase Module: Cloud Firestore