ol3禁用掉默认的拖动、旋转等交互
作者:互联网
var map = new ol.Map({
controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
collapsible: true
})
}).extend([
]),
layers: [locallayer], //myglayer,mylblayer
overlays: [overlay],
// 禁用掉默认的拖动、旋转等交互
interactions: ol.interaction.defaults({
altShiftDragRotate: false,
dragPan: false,
rotate: false
}).extend([new ol.interaction.DragPan({kinetic: null})]),
target: 'map',
view: new ol.View({
zoom: 13,
interactions:new ol.interaction.defaults({
pinchRotate:false
}),
center: ol.proj.transform([117.5190,36.6964], 'EPSG:4326', 'EPSG:3857'),
rotation:0
})
});
标签:control,ol,false,拖动,禁用,ol3,defaults,interaction,new 来源: https://www.cnblogs.com/devgis/p/16542768.html