旋转属于交互事件,禁止旋转需要在interation里面去定义,

相关设置: https://openlayers.org/en/latest/apidoc/module-ol_interaction.html

import {defaults as defaultInteractions} from 'ol/interaction'

 

openlayser 移动端禁止地图旋转

 

 

 

      this.map = new Map({
        interactions: defaultInteractions({
          pinchRotate: false // 移动端禁止地图旋转
        }),
        layers: [ layers ],
        target: 'map',
        view: _this.view
      })

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-12-05
  • 2022-01-26
  • 2022-12-23
  • 2021-11-21
  • 2021-05-25
猜你喜欢
  • 2021-10-14
  • 2022-01-30
  • 2021-10-30
  • 2021-12-04
  • 2021-12-27
  • 2022-12-23
相关资源
相似解决方案