daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. map.getView().on('change:resolution', function(resolution) {
  2.     var zoom = map.getView().getZoomforResolution(resolution);
  3.     var view = this;
  4.     if (zoom <=  view.getMinZoom || zoom >= view.getMaxZoom) {
  5.       // set css of button here
  6.     } else {
  7.       // reset css of button to its original
  8.     }
  9.   });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top