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

parseParams separates a WKT Polygon on comma #2

Open
Idzikowski-Casey opened this issue Jan 21, 2021 · 1 comment
Open

parseParams separates a WKT Polygon on comma #2

Idzikowski-Casey opened this issue Jan 21, 2021 · 1 comment

Comments

@Idzikowski-Casey
Copy link
Collaborator

The parseParams function is splitting a well-known text geometry on the commas separating the coordinates. This use case is occurring when using the getQueryString. I think the issue is the parseParams passes the prop arrayFormat as "comma," to parse from query-string, instead of leaving the default which is none.

@davenquinn
Copy link
Member

Good catch! It's entirely possible we will have arguments in which we want commas to be handled differently, but I think we want there to be a "sane default" behavior. I don't know if the underlying query-string library has internal tools for treating parameters separately.

It looks like you can override the comma-parsing behavior in parseParams by passing your own arrayFormat argument, but this config option isn't passed through to the getHashString and setHashString functions. We should pass through the opts argument if we can.

Even this doesn't help with our problem though, because that solution breaks if we want to handle WKTs and arrays (e.g. nest=... in Sparrow) in the same parameter array. Perhaps a solution would be to urlencode the commas in the WKT somehow?

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