在OpenLayers中为ol.events.condition.shiftKeyOnly导入ES模块



我使用的是开放图层约定

var osm_default = new TileLayer({
source: new OSM()
});

但是我怎么处理

var dragBoxInteraction = new DragBox({
condition: ol.events.condition.shiftKeyOnly,

其他都通过

处理
import GeoJSON from 'ol/format/GeoJSON.js';
import Feature from 'ol/Feature.js';
import Style from 'ol/style/Style';
import Stroke from 'ol/style/Stroke.js';
import {defaults} from 'ol/interaction/defaults';
import {transform} from 'ol/proj.js';
import TileLayer from 'ol/layer/Tile.js';
// the following doesn't work. A SWAG
import {shiftKeyOnly} from 'ol​/events​/condition';

我很接近了。import {shiftKeyOnly} from 'ol/events/condition.js';

相关内容

  • 没有找到相关文章

最新更新