-
Notifications
You must be signed in to change notification settings - Fork 13
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
allow for multiple osm_tags #21
base: master
Are you sure you want to change the base?
Conversation
verifies that non-strings have a length > 0. removes string encoding - osm_tag place:value combos are currently broken due to encoding the colon.
Thanks for this work!
|
@@ -372,7 +376,7 @@ L.PhotonSearch = L.PhotonBaseSearch.extend({ | |||
}, | |||
|
|||
_onSelected: function (feature) { | |||
this.map.setView([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems unrelated to the current topic.
if (params[key]) { | ||
queryString.push(encodeURIComponent(key) + '=' + encodeURIComponent(params[key])); | ||
if (params[key] && (typeof(params[key]) == 'string' || typeof(params[key]) == 'number')) { | ||
queryString.push(encodeURIComponent(key) + '=' + params[key]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be factorized with the line 38.
Basically I think the pattern is to always process an array, and turn the param in an array when it's not.
uh... yah, unrelated and unintended. I couldn't figure out how to
override this behavior - please ignore.
…On Wed, 06 Jun 2018 11:15:59 -0700 Yohan Boniface ***@***.***> wrote:
yohanboniface commented on this pull request.
> @@ -372,7 +376,7 @@ L.PhotonSearch = L.PhotonBaseSearch.extend({
},
_onSelected: function (feature) {
- this.map.setView([feature.geometry.coordinates[1],
feature.geometry.coordinates[0]], 16);
This change seems unrelated to the current topic.
|
You are correct, however, photon is not processing encoded colons
properly. I suppose the real fix is to kick it over to photon as a
bug... as I was under a time crunch I treated it as a feature. =)
j
…On Wed, 06 Jun 2018 18:15:35 +0000 (UTC) Yohan Boniface ***@***.***> wrote:
Thanks for this work!
The array support seems legit, but I've some comments.
> calling encodeURIComponent on osm_tag(s) breaks place:city
`:` is not valid as query string key, afaik:
https://tools.ietf.org/html/rfc3986#section-2.2
|
update buildQueryString() to accept array values. This allows for passing an array of osm_tag values and having them all passed to the photon server correctly.
calling encodeURIComponent on osm_tag(s) breaks place:city