Nativescript Geosearch Error

Multi tool use
Nativescript Geosearch Error
I am building an ios version of my android app that uses algolia
I am building the app using the nativescript - angular frameworks
I used the plugin ativeScript-Algolia but everytime I search by aroundLatLng
I get the error
Error : {"status":400,"reason":"Invalid value for "aroundLatLng" parameter, expected float"}
here is the relevant code
//in the constructor of the component
this.client = new Algolia('ddd', 'aaa');
this.index = this.client.initIndex('index');
//inside ngOnInit
let latLng:string = parseFloat(this.lat).toFixed(4) + ',' +
parseFloat(this.lng).toFixed(4);
this.index.search(this.searchTerms , {
aroundLatLng : latLng,
aroundRadius: this.radius
} , (content , err) => {
if(err){
console.log("Error : " + JSON.stringify(err));
}else{
console.log("RESULT IS : " + JSON.stringify(content));
}
});
the result is always the error above ,
how can I resolve this ?
string
number
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
You are passing a
string
instead of anumber
– Nick Iliev
Jul 2 at 10:29