Comments (9)
still working on getting this done. I did an update on my react native and now my project won't build. I'll get this sorted out today and let you know.
Thank you!
from geofirestore-js.
Looks like you forgot the .latitude in your first argument.
For everything else, we would need to see more of your code.
from geofirestore-js.
I'm sorry I wrote it out wrong. I should've just pasted from my code rather than type it over. I'm still getting the same error.
I'm running the getCurrentPosition function in componentDidMount.
getCurrentPosition(){
navigator.geolocation.getCurrentPosition((position) => {
region = {
latitude: position.coords.latitude,
longitude: position.coords.longitude,
latitudeDelta: 0.00922,
longitudeDelta: 0.00421,
error: null,
}
this.setState({
region,
});
},
(error) => this.setState({ error: error.message }),
{ enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 },
);
}
then I run the following code in another function.
var ref = firebase.firestore().collection('myCollection');
const geoFirestore = new GeoFirestore(this.ref);
const geoQuery = geoFirestore.query({
center: new firebase.firestore.GeoPoint(this.state.region.latitude, this.state.region.longitude),
radius: 10.5
});
from geofirestore-js.
Which version of firebase and geofirestore are you using?
from geofirestore-js.
geofirestore "version": "2.0.2"
firebase "version": "4.13.1"
from geofirestore-js.
Try to update firebase to any version above 5.0.0, they changed docChanges into a method at that release, so it might be possible that the geofirestore code tries to access a variable that now is a function.
from geofirestore-js.
@MvRemmerden is absolutely correct, geofirestore
is designed for firebase
version5.x.x
. Try that and you should be all set.
from geofirestore-js.
@kingtross88 let me know if updating your firebase did the trick for you. If we don't hear back I'll be closing this in a day or so.
from geofirestore-js.
updated firebase and did a node update. closing this out
from geofirestore-js.
Related Issues (20)
- Question - how can I find near documents with each unique radius? HOT 11
- How to write to firestore after geofirestore query HOT 1
- can't write to firestore properly after geofirestore query HOT 1
- StartAt or startAfter support HOT 1
- Query speed HOT 6
- Custom document key HOT 1
- Geoqueries with additional queries? HOT 3
- When querying `near`: `distance` prop is missing when distance is 0 HOT 1
- Support for Firebase JS SDK 9 HOT 9
- customKey not working on read HOT 10
- Pass a custom document ID HOT 1
- Query returning zero results when filtering with where HOT 8
- Support for new firestore 9.x? HOT 1
- runTransaction on a collection (server-side using cloud functions) HOT 1
- firebase geofirestore v9 not working HOT 1
- Bug double removed on a marker HOT 1
- Geofirestore and onSnapshot are giving delayed events - information is not updating properly
- Unsubscribe from GeoQuery.onSnapshot on document deletion HOT 1
- Typescript errors when trying to deploy function HOT 2
- Is there a way to update the criteria of GeoQuery ? Rather then making a new one
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geofirestore-js.