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


JavaScript ArcGIS Bookmarks.defaultCreateOptions用法及代碼示例

基本信息

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

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

ESM: import Bookmarks from "@arcgis/core/widgets/Bookmarks";

類: esri/widgets/Bookmarks

繼承: Bookmarks > Widget > Accessor

自從:用於 JavaScript 4.8 的 ArcGIS API

用法說明

Bookmarks.defaultCreateOptions函數(或屬性)的定義如下:

defaultCreateOptions BookmarkOptions


自從:ArcGIS 適用於 JavaScript 4.18 的 API

指定如果 editEnabled 設置為 true 則如何創建新書簽。可用於在創建書簽時啟用或禁用基於當前視圖的屏幕截圖或捕獲書簽的視點。有關選項的完整列表,請參閱BookmarkOptions

例子:

const bookmarks = new Bookmarks({
   view: view,
   editingEnabled: true,
   // whenever a new bookmark is created, a 100x100 px
   // screenshot of the view will be taken and the rotation, scale, and extent
   // of the view will not be set as the viewpoint of the new bookmark
   defaultCreateOptions: {
     takeScreenshot: true,
     captureViewpoint: false,
     captureTimeExtent: false, // the time extent of the view will not be saved in the bookmark
     screenshotSettings: {
       width: 100,
       height: 100
     }
   }
});

相關用法


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