Ticket #1127 (closed bug: invalid)
cannot set maxResolution as an option on layer creation, it is always overridden in initResolutions
|Reported by:||johnwebbcole||Owned by:|
I have a utility that emits the JS needed for creating OL layers, an option is to emit the resolutions available to each layer.
An issue I ran into is that if you pass in a full array of resolutions, and try to set a maxResolution, the initResolutions function resets maxResolution to resolutions. It appears that confProps.maxResolution is set, so I've modified initResolutions to use that value instead of the top of the resoltuions array.
This fixes my issue with the LayerSelector and not being able to have a layer out of range from the layers options.
I can easily see possible side effects if other code is assuming that the max resolution of a layer is equal to the first value in the resolution array but a quick find in files didn't turn up anyone using resolutions.
This issue might also cause a maxScale option to be effectively ignored as well (as the inRange is set from the maxResolution value and not the maxScale value).
Not sure on everyone else's priority but it was major to me :-) It took a while to figure out why an option was being ignored.