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

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

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

 

 

 

 

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