Skip to content

wkt.read is sensitive to spaces #144

Description

@Portur

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"}')));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionverifyPotential bug, needs a test and possibly a fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions