-
-
Notifications
You must be signed in to change notification settings - Fork 6k
handle existing query strings for WMS urls , #973 #1231
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
Conversation
| @@ -77,14 +77,20 @@ L.Util = { | |||
| return obj.options; | |||
| }, | |||
|
|
|||
| getParamString: function (obj) { | |||
| getParamString: function (obj, existing_url) { | |||
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.
Please conform to existing code conventions (camelCase variables, whitespace, etc.)
|
Sorry about that - how does it look now, with 8d442b1 in? |
| var params = []; | ||
| for (var i in obj) { | ||
| if (obj.hasOwnProperty(i)) { | ||
| params.push(i + '=' + obj[i]); | ||
| } | ||
| } | ||
| return '?' + params.join('&'); | ||
| return (existingUrl.indexOf('?') === -1 ? '?' : '&') + params.join('&'); |
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.
I'd also add a check for existingUrl here so that it's not required (and it uses '?' if not provided). Otherwise looks good!
|
Okay, in. |
handle existing query strings for WMS urls , #973
|
Looks good, thanks! |
I don't use WMS layers currently, but this looks like a feature worth having. Issue #973
Including a test as well.