當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


JavaScript ArcGIS SegmentDrawAction.mode用法及代碼示例

基本信息

以下是所在類或對象的基本信息。

AMD: require(["esri/views/draw/SegmentDrawAction"], (SegmentDrawAction) => { /* code goes here */ });

ESM: import SegmentDrawAction from "@arcgis/core/views/draw/SegmentDrawAction";

類: esri/views/draw/SegmentDrawAction

繼承: SegmentDrawAction > DrawAction > Accessor

自從:用於 JavaScript 4.7 的 ArcGIS API

用法說明

SegmentDrawAction.mode函數(或屬性)的定義如下:

mode String


繪圖模式。它僅在首次創建操作時才相關。它的值在操作生命周期內不能更改。

可能的值

說明
freehand 拖動指針時添加頂點。
click 單擊指針時會添加頂點。 SegmentDrawActions 由 2 個頂點創建。

可能的值"freehand"|"click"

默認值:freehand

例子:

draw.create("rectangle", {mode: "click"});

相關用法


注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 SegmentDrawAction.mode。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。