Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON.parse #20

Open
reyemtm opened this issue Mar 3, 2016 · 1 comment
Open

JSON.parse #20

reyemtm opened this issue Mar 3, 2016 · 1 comment

Comments

@reyemtm
Copy link

reyemtm commented Mar 3, 2016

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

@caseycesari
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants