Javascript OpenLayers before zoom event listener

前端 未结 5 1944
醉酒成梦
醉酒成梦 2021-02-09 03:46

I am trying to set up OpenLayers to not display the vector layer just before a zoom starts and make it reappear after a zoom ends. I have the zoom ends part already established

5条回答
  •  别那么骄傲
    2021-02-09 04:06

    Solution of "Shaunak" is worked very well for me. I want to restrict zooming below 11 so edited his code as

    if (zoom > 11) {
        map.zoomToProxy(zoom, xy);
    }
    

提交回复
热议问题