I was having a few issues where the coordinates were not coming in as an array but rather as raw values. To fix this I changed line 144
geom.coordinates = JSON.parse(item[val]);
Also, in one case I am pulling data from a google sheet where the fields point, line and polygon all exist, so I added a test for any values first before building the array of points - line 142
if(item[val] && typeof val === 'string' && item.hasOwnProperty(val)) {
Hoping these can be added to the source. Thanks
I was having a few issues where the coordinates were not coming in as an array but rather as raw values. To fix this I changed line 144
Also, in one case I am pulling data from a google sheet where the fields point, line and polygon all exist, so I added a test for any values first before building the array of points - line 142
Hoping these can be added to the source. Thanks