Indicia-Team / media

Shared library of JavaScript code,
0 stars 2 forks source link

Update to dynamic zooming layer switching logic #20

Closed burkmarr closed 5 years ago

burkmarr commented 5 years ago

Updated to perform layer selection based on width of map rather than zoom level, which changes depending on map layer.

This addresses https://github.com/BiologicalRecordsCentre/iRecord/issues/629.

Dynamic map sub-layers updated to include a maxZoom property which specifies the width of the map, in metres, above which this layer should not be displayed. The logic will select highest resolution sub-layer (highest sub-layer index) that is allowed to be displayed at the current map extent (width in metres).

I've left the previous method in - commented out - for now for comparison.