基本信息
以下是所在类或对象的基本信息。
AMD:
require(["esri/rest/support/Stop"], (Stop) => { /* code goes here */ });
ESM:
import Stop from "@arcgis/core/rest/support/Stop";
类:
esri/rest/support/Stop
继承: Stop > Accessor
自从:用于 JavaScript 4.23 的 ArcGIS API
用法说明
停靠点表示 RouteLayer 或 RouteParameters 中路线的起点、终点或中点。
例子:
// Display the route name and overall distance and duration.
const routeLayer = new RouteLayer({
portalItem: {
id: "69569b47b1e445b8a42ec12feab41ce9"
}
});
await routeLayer.load();
const locale = "en-US";
const formatDate = new Intl.DateTimeFormat(locale, {
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
timeZone: "America/Los_Angeles"
});
for (const stop of routeLayer.stops) {
const { arriveTime, departTime, name, locationType } = stop;
console.log(`Stop: ${locationType} at ${name}`);
console.log(`Arrival Time: ${formatDate.format(arriveTime)}`);
console.log(`Departure Time: ${formatDate.format(departTime)}`);
}
// Stop: stop at Kenoak Pl, Pomona, California, 91768
// Arrival Time: 12/7/2020, 3:58:50 PM
// Departure Time: 12/7/2020, 3:58:50 PM
// Stop: stop at 173 E Arbeth St, Rialto, California, 92377
// Arrival Time: 12/7/2020, 4:38:29 PM
// Departure Time: 12/7/2020, 4:38:29 PM
// etc
相关用法
- JavaScript ArcGIS StreamLayer.timeOffset用法及代码示例
- JavaScript String.prototype.toLocaleLowerCase()用法及代码示例
- JavaScript String slice()用法及代码示例
- JavaScript String length用法及代码示例
- JavaScript String padStart()用法及代码示例
- JavaScript ArcGIS StreamLayer layerview-create-error事件用法及代码示例
- JavaScript String strike()用法及代码示例
- JavaScript ArcGIS StreamLayer.minScale用法及代码示例
- JavaScript ArcGIS StreamLayerView.queryFeatureCount用法及代码示例
- JavaScript ArcGIS StatisticDefinition用法及代码示例
- JavaScript String fromCodePoint()用法及代码示例
- JavaScript String blink()用法及代码示例
- JavaScript String repeat()用法及代码示例
- JavaScript ArcGIS StreamLayer.purgeOptions用法及代码示例
- JavaScript ArcGIS StatisticDefinition.onStatisticField用法及代码示例
- JavaScript String charCodeAt()用法及代码示例
- JavaScript String fontcolor()用法及代码示例
- JavaScript String endsWith()用法及代码示例
- JavaScript ArcGIS StatisticDefinition.statisticParameters用法及代码示例
- JavaScript ArcGIS StreamLayerView.queryObjectIds用法及代码示例
- JavaScript String substr()用法及代码示例
- JavaScript ArcGIS StatisticDefinition.statisticType用法及代码示例
- JavaScript String toLocaleLowerCase()用法及代码示例
- JavaScript ArcGIS StreamLayer.fields用法及代码示例
- JavaScript ArcGIS StreamLayer.effect用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 Stop。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。