GeoJSON.js icon indicating copy to clipboard operation
GeoJSON.js copied to clipboard

JSON.parse

Open reyemtm opened this issue 9 years ago • 1 comments

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

reyemtm avatar Mar 03 '16 14:03 reyemtm

Thanks for opening an issue, @reyemtm. I'll take a look. Feel free to open a pull request too.

caseycesari avatar Mar 30 '16 12:03 caseycesari