You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ok we want resolutions, here's our strategy:
//
// 1. if resolutions are defined in the layer config, use them
// 2. else, if scales are defined in the layer config then derive
// resolutions from these scales
// 3. else, attempt to calculate resolutions from maxResolution,
// minResolution, numZoomLevels, maxZoomLevel set in the
// layer config
// 4. if we still don't have resolutions, and if resolutions
// are defined in the same, use them
// 5. else, if scales are defined in the map then derive
// resolutions from these scales
// 6. else, attempt to calculate resolutions from maxResolution,
// minResolution, numZoomLevels, maxZoomLevel set in the
// map
// 7. hope for the best!
This is the cause of 95% of help requests I see around OpenLayers. There should be two modes: calculate based on zoom levels, and give a specific set of resolutions. This guessing is just too much cognitive overhead and magic to be anywhere near predictable for implementations.
The text was updated successfully, but these errors were encountered:
Via this comment:
This is the cause of 95% of help requests I see around OpenLayers. There should be two modes: calculate based on zoom levels, and give a specific set of resolutions. This guessing is just too much cognitive overhead and magic to be anywhere near predictable for implementations.
The text was updated successfully, but these errors were encountered: