-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fixed client-dots and labels not showing on zoom levels >= 19 #12
Conversation
var maxLayerZoom = Math.max.apply(Math, config.mapLayers.map( | ||
function(d) { | ||
return (typeof d.config !== "undefined" && typeof d.config.maxZoom !== "undefined") ? d.config.maxZoom : 18 | ||
})) |
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 have no idea whether you can do this in a nicer way. Anyone?
First please shorten the commit name and prefix a "map: ". |
What do you mean with "current map source"? |
* client dots and labels only showed up on zoom levels up to 18
"mapLayers": [ |
Yes, this is an element of config.mapLayers in my code. |
I see now. |
I tested it, but I would appreciate another double-check. My current dev environment is a bit strange, and it could have happened that something broke when transferring the patch to somewhere where I could push :) |
Then I will test it in the evening and merge it then. |
This commits checks whether a maxZoom is set for a mapLayer in config.json and sets maxZoom on the client and label layers to the maximum value of these maxZoom values.
If no maxZoom was given, the leaflet default maxZoom of 18 is assumed.