校园-江西科技师范大学-前端
shuishen
2023-12-08 331f3d5bf0edee1946f65576e0c49d61b292a95d
禁止地图旋转
1 files modified
4 ■■■■ changed files
src/store/modules/openlayerData.js 4 ●●●● patch | view | raw | blame | history
src/store/modules/openlayerData.js
@@ -33,6 +33,7 @@
import OlSourceOSM from "ol/source/OSM.js";
import OlLayerTile from "ol/layer/Tile.js";
import OlMap from "ol/Map.js";
import { defaults as defaultInteractions } from "ol/interaction";
import XYZ from "ol/source/XYZ";
@@ -49,6 +50,9 @@
    },
    openlayers: {
      map2D: new OlMap({
        interactions: defaultInteractions({
          pinchRotate: false, // 移动端禁止地图旋转
        }),
        layers: [
          /**
             *  new OlLayerTile({