Closed d3mac123 closed 6 years ago
I found the solution:
var NSGeoFire = require("nativescript-geofire-plugin").NSGeoFire;
var geoFire = new NSGeoFire('/geofire');
var key = "test";
var lat = 25.503266;
var long = -80.551445
geoFire.set(key, [lat, long]).then(() => {
console.log('Geo key is added ');
});
Hi,
I am trying the following code (as I am not a TS developer):
However, I am getting the following error:
JS ERROR TypeError: geoFire.set is not a function. (In 'geoFire.set(key, [lat, long])', 'geoFire.set' is undefined)
If I try:
The error is:
JS ERROR TypeError: Object is not a constructor (evaluating 'new NSGeoFire('/geofire')')
Any idea on how to fix it?