-
apiKey
String
用於訪問資源或服務的授權字符串。 API keys 在 ArcGIS Developer dashboard 中生成和管理。 API key 明確綁定到ArcGIS 帳戶;它還用於監視服務使用情況。在特定類上設置細粒度 API key 會覆蓋 global API key 。
例子:
const stops = new FeatureSet({ features: [ new Graphic({ geometry: new Point({ x: -117.1949676, y: 34.0571844 }) }), new Graphic({ geometry: new Point({ x: -117.0619917, y: 34.0010284 }) }) ] }); const routeParameters = new RouteParameters({ apiKey: "YOUR_API_KEY", stops }); const routeURL = "https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World"; const routeContainer = await route.solve(routeURL, routeParameters); const routeLayer = routeContainer.routeResults[0].route; const { attributes, geometry } = routeLayer; view.graphics.add(new Graphic({ attributes, geometry, symbol: { type: "simple-line", color: "green", width: "8px" } }));
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/rest/support/RouteParameters"], (RouteParameters) => { /* code goes here */ });
ESM:
import RouteParameters from "@arcgis/core/rest/support/RouteParameters";
類:
esri/rest/support/RouteParameters
繼承: RouteParameters > Accessor
自從:用於 JavaScript 4.20 的 ArcGIS API
用法說明
RouteParameters.apiKey
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS RouteParameters.findBestSequence用法及代碼示例
- JavaScript ArcGIS RouteParameters.travelMode用法及代碼示例
- JavaScript ArcGIS RouteLayer.solve用法及代碼示例
- JavaScript ArcGIS RouteLayer layerview-create事件用法及代碼示例
- JavaScript ArcGIS RouteLayer.stops用法及代碼示例
- JavaScript ArcGIS RouteLayer.opacity用法及代碼示例
- JavaScript ArcGIS RouteLayer.visible用法及代碼示例
- JavaScript ArcGIS RouteLayer.saveAs用法及代碼示例
- JavaScript ArcGIS RouteLayer.portalItem用法及代碼示例
- JavaScript ArcGIS RouteLayer.effect用法及代碼示例
- JavaScript ArcGIS RouteLayer.url用法及代碼示例
- JavaScript ArcGIS RouteLayer layerview-create-error事件用法及代碼示例
- JavaScript ArcGIS RouteLayer.minScale用法及代碼示例
- JavaScript ArcGIS RouteLayer.maxScale用法及代碼示例
- JavaScript ArcGIS RouteInfo用法及代碼示例
- JavaScript ArcGIS RouteLayer.when用法及代碼示例
- JavaScript ArcGIS RouteLayer.on用法及代碼示例
- JavaScript ArcGIS RouteLayer.fullExtent用法及代碼示例
- JavaScript ArcGIS RouteLayer.save用法及代碼示例
- JavaScript ArcGIS RouteLayer用法及代碼示例
- JavaScript ArcGIS RotationVariable用法及代碼示例
- JavaScript ArcGIS RotationVariable.clone用法及代碼示例
- JavaScript ArcGIS RasterShadedReliefRenderer.clone用法及代碼示例
- JavaScript ArcGIS RelationshipQuery.orderByFields用法及代碼示例
- JavaScript ArcGIS RasterColormapRenderer.createFromColormap用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 RouteParameters.apiKey。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。