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

wkt.read is sensitive to spaces #144

Open
Portur opened this issue Apr 16, 2020 · 1 comment
Open

wkt.read is sensitive to spaces #144

Portur opened this issue Apr 16, 2020 · 1 comment
Labels
question verify Potential bug, needs a test and possibly a fix

Comments

@Portur
Copy link

Portur commented Apr 16, 2020

This works
wicket.read('{"coordinates": [[[30, 10], [10, 20], [20, 40], [40, 40], [30, 10]]], "type": "Polygon"}');

This does not work
wicket.read('{"coordinates" : [[[30, 10], [10, 20], [20, 40], [40, 40], [30, 10]]], "type" : "Polygon"}');

The difference being a space after coordinates in the second example.

Here is a quick fix
wicket.read(JSON.stringify(JSON.parse('{"coordinates" : [[[30, 10], [10, 20], [20, 40], [40, 40], [30, 10]]], "type" : "Polygon"}')));

@arthur-e
Copy link
Owner

@Portur thanks for this report! I look forward to a pull request with a test and fix.

@arthur-e arthur-e added question verify Potential bug, needs a test and possibly a fix labels Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question verify Potential bug, needs a test and possibly a fix
Projects
None yet
Development

No branches or pull requests

2 participants