Reputation: 105
I have issue with converting. I getting error like this:
Type '() => number' is not assignable to type 'number'.
In this part of code:
...
for (let g of parcelData.geom){
const point = [];
let lat : number;
lat = g.lat; // error there
...
Somebody can tell me how i can convert this to classic number?
Upvotes: 0
Views: 715
Reputation: 1826
g.lat()
is a function and you should assign it like below.
lat = g.lat()
Upvotes: 3
Reputation: 5742
Note
first of all check data type of parcelData.geom
console.log(typeof parcelData.geom);
then change below according to that
let lat : number;<----then change this
lat = g.lat;
Upvotes: 0