function staticMap(map, isFrozen) { | |
if (isFrozen) { | |
map.layerIds.map(function (x) { | |
map.getLayer(x).suspend(); | |
}); | |
map.disableClickRecenter(); | |
map.disableDoubleClickZoom(); | |
map.disableKeyboardNavigation(); | |
map.disableMapNavigation(); | |
map.disablePan(); | |
map.disableRubberBandZoom(); | |
map.disableScrollWheelZoom(); | |
map.disableShiftDoubleClickZoom(); | |
map.hideZoomSlider(); | |
} else { | |
map.layerIds.map(function (x) { | |
map.getLayer(x).resume(); | |
}); | |
map.enableClickRecenter(); | |
map.enableDoubleClickZoom(); | |
map.enableKeyboardNavigation(); | |
map.enableMapNavigation(); | |
map.enablePan(); | |
map.enableRubberBandZoom(); | |
map.enableScrollWheelZoom(); | |
map.enableShiftDoubleClickZoom(); | |
map.showZoomSlider(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment