UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

53 lines (51 loc) 3.11 kB
import type Association from "./Association.js"; import type { JSONSupport } from "../../../core/JSONSupport.js"; import type { AssociationProperties } from "./Association.js"; export interface QueryAssociationsResultProperties { /** List of [associations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) returned filtered based on the input parameters in [QueryAssociationsParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/QueryAssociationsParameters/). */ associations?: AssociationProperties[]; } /** * Defines the results of the [queryAssociations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/queryAssociations/) function which takes in [QueryAssociationsParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/QueryAssociationsParameters/) and returns an [QueryAssociationsResult](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/QueryAssociationsResult/) of all * [associations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) filtered by the parameters set. * * @since 4.25 * @see [Association](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) * @see [AggregatedGeometry](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/AggregatedGeometry/) * @see [queryAssociations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/queryAssociations/) * @example * // Define the QueryAssociationsParameters * const queryAssociationsParameters = new QueryAssociationsParameters({ * types: ["containment", "attachment", "junction-edge-from-connectivity"], * elements: [ * { * networkSourceId: 2, * globalId: "{46B3FA19-2237-4D38-A7CF-AA34C3T40420}", * objectId: 44, * terminalId: 1, * assetGroupCode: 1, * assetTypeCode: 1 * }, * { * networkSourceId: 9, * globalId: "{321C0089-1165-42D9-K45B-ED91B1A40500}", * objectId: 45, * terminalId: 1, * assetGroupCode: 13, * assetTypeCode: 441 * } * ] * }); * * // Query associations, and assign the query result to a variable `associations` * const associations = await queryAssociations(networkServiceUrl, queryAssociationsParameters); * * // Print out the first association * console.log(associations[0]); */ export default class QueryAssociationsResult extends JSONSupport { constructor(properties?: QueryAssociationsResultProperties); /** List of [associations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) returned filtered based on the input parameters in [QueryAssociationsParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/QueryAssociationsParameters/). */ get associations(): Association[]; set associations(value: AssociationProperties[]); }