const { ApiKeyManager } = require("@esri/arcgis-rest-request"); const { queryFeatures } = require("@esri/arcgis-rest-feature-service"); const apiKey = "YOUR_API_KEY"; const authentication = ApiKeyManager.fromKey(apiKey); queryFeatures({ url: "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/LA_County_Parcels/FeatureServer/0", where: "UseType = 'Residential'", resultRecordCount: 1, authentication }).then((response) => { console.log(response.features); }); const { ApiKeyManager } = require("@esri/arcgis-rest-request"); const { serviceArea } = require("@esri/arcgis-rest-routing"); const apiKey = "YOUR_API_KEY"; const authentication = ApiKeyManager.fromKey(apiKey); serviceArea({ facilities: [ [-123.1171, 49.2818] // Vancouver ], authentication }).then((response) => { console.log(response); });
top of page
bottom of page
{ "messages": [], "saPolygons": { "geometryType": "esriGeometryPolygon", "spatialReference": { "wkid": 4326, "latestWkid": 4326 }, "features": [ { "attributes": { "ObjectID": 1, "FacilityID": 1, "Name": "Location 1 : 10 - 15", "FromBreak": 10, "ToBreak": 15, "Shape_Length": 1.8343392272037797, "Shape_Area": 0.008541652586953032 }, "geometry": { "rings": [ [ [-123.10635981999997, 49.35633154900006], [-123.10613524299998, 49.35633154900006], [-123.10546150899995, 49.355433238000046], [-123.10523693099998, 49.355433238000046], [-123.10568608699998, 49.35363661500003], [-123.10388946499995, 49.353412037000055], [-123.10299115299995, 49.35228914800007], [-123.10254199799999, 49.35071710400007],