Firebase library (firebase, firebase-admin, etc...) and version: 7.15.0
GeoFirestore version: latest
I forked the viewers repository
i added my own firebase
I created my own collection of documents
I added 2 parameters 'city' and 'interestingFact'
the documents enter the collection just fine
Describe the bug
only my location appears. none of the markers I add appear
Steps to Reproduce
Go to '...'
Click on '....'
Scroll to '....'
See error
Relevant Code
jaredgibb.github.io/viewers/
^^^^^ all code can be found here ^^^^^^
function getInFirestore(location, city, interestingFact) {
location.lat = Number(location.lat.toFixed(1));
location.lng = Number(location.lng.toFixed(1));
const hash = Geokit.hash(location);
geoCollectionRef.doc(hash).get().then((snapshot) => {
let data = snapshot.data();
if (!data) {
data = {
city: city,
interestingFact: interestingFact,
coordinates: new firebase.firestore.GeoPoint(location.lat, location.lng)
};
console.log('Provided key is not in Firestore, adding document: ', JSON.stringify(data));
createInFirestore(hash, data);
} else {
console.log('Provided key is in Firestore, updating document: ', JSON.stringify(data));
updateInFirestore(hash, data);
}
}, (error) => {
console.log('Error: ' + error);
});
}
the original document that appears on the screen
this image demonstrates that the documents are created.
it seems like the code is only recieving 1 document. i'm so new to JS that i am lost. any help will be appreciated!
[REQUIRED] Describe your environment
firebase
,firebase-admin
, etc...) and version: 7.15.0I forked the viewers repository i added my own firebase I created my own collection of documents I added 2 parameters 'city' and 'interestingFact' the documents enter the collection just fine
Describe the bug
only my location appears. none of the markers I add appear
Steps to Reproduce
Relevant Code
jaredgibb.github.io/viewers/ ^^^^^ all code can be found here ^^^^^^
the original document that appears on the screen
this image demonstrates that the documents are created.
it seems like the code is only recieving 1 document. i'm so new to JS that i am lost. any help will be appreciated!