-
Notifications
You must be signed in to change notification settings - Fork 2
esri client.js
andy.rothwell edited this page Sep 27, 2018
·
4 revisions
The fetch() function is called if a datasource uses "type: 'esri'". For example:
export default {
id: 'divisions',
url: 'https://services.arcgis.com/fLeGjb7u4uXqeF9q/arcgis/rest/services/Political_Divisions/FeatureServer/0',
type: 'esri',
options: {
relationship: 'contains',
},
success(data) {
return data;
},
};
The function takes the following parameters:
parameter | description or example |
---|---|
feature | |
dataSource | |
dataSourceKey |
The fetchNearby() function is called if a datasource uses "type: 'esri-nearby'". For example:
export default {
id: 'neighboringProperties',
type: 'esri-nearby',
url: 'https://services.arcgis.com/fLeGjb7u4uXqeF9q/ArcGIS/rest/services/PWD_PARCELS/FeatureServer/0',
options: {
geometryServerUrl: '//gis.phila.gov/arcgis/rest/services/Geometry/GeometryServer/',
calculateDistance: true,
distances: 320,
}
}
The function takes the following parameters:
parameter | description or example |
---|---|
feature | |
dataSource | |
dataSourceKey |
fetchBySpatialQuery is called by both "fetch" and "fetchNearby". The function takes the following parameters:
parameter | description or example |
---|---|
dataSourceKey | |
url | |
relationship | |
targetGeom | |
parameters | |
options | |
calculateDistancePt |