etincidunt 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.prettierignore +2 -0
- package/.travis.yml +29 -0
- package/.vscode/launch.json +24 -0
- package/.vscode/settings.json +3 -0
- package/demos/ago-node-cli/README.md +29 -0
- package/demos/ago-node-cli/ago.js +32 -0
- package/demos/ago-node-cli/index.js +11 -0
- package/demos/ago-node-cli/lib/item-export-command.js +48 -0
- package/demos/ago-node-cli/lib/item-search-command.js +35 -0
- package/demos/ago-node-cli/package-lock.json +172 -0
- package/demos/ago-node-cli/package.json +30 -0
- package/demos/attachments/README.md +5 -0
- package/demos/attachments/index.html +164 -0
- package/demos/attachments/package-lock.json +182 -0
- package/demos/attachments/package.json +18 -0
- package/demos/batch-geocoder-node/NYC_Restaurant_Inspection_Results.csv +100 -0
- package/demos/batch-geocoder-node/README.md +14 -0
- package/demos/batch-geocoder-node/batch-geocode.js +112 -0
- package/demos/batch-geocoder-node/config-template.js +18 -0
- package/demos/batch-geocoder-node/package-lock.json +109 -0
- package/demos/batch-geocoder-node/package.json +37 -0
- package/demos/express/README.md +10 -0
- package/demos/express/config.json.template +3 -0
- package/demos/express/package-lock.json +388 -0
- package/demos/express/package.json +18 -0
- package/demos/express/server.js +28 -0
- package/demos/feature-service-browser/README.md +6 -0
- package/demos/feature-service-browser/index.html +122 -0
- package/demos/feature-service-browser/package-lock.json +182 -0
- package/demos/feature-service-browser/package.json +18 -0
- package/demos/geocoder-browser/README.md +10 -0
- package/demos/geocoder-browser/config.js.template +1 -0
- package/demos/geocoder-browser/index.html +131 -0
- package/demos/geocoder-browser/package-lock.json +163 -0
- package/demos/geocoder-browser/package.json +19 -0
- package/demos/geocoder-browser/post-sign-in.html +25 -0
- package/demos/jsapi-integration/README.md +8 -0
- package/demos/jsapi-integration/config.js +6 -0
- package/demos/jsapi-integration/index.html +79 -0
- package/demos/jsapi-integration/package-lock.json +184 -0
- package/demos/jsapi-integration/package.json +19 -0
- package/demos/oauth2-browser/README.md +12 -0
- package/demos/oauth2-browser/authenticate.html +32 -0
- package/demos/oauth2-browser/config.js.template +6 -0
- package/demos/oauth2-browser/index.html +202 -0
- package/demos/oauth2-browser/logo.svg +4 -0
- package/demos/oauth2-browser/package-lock.json +163 -0
- package/demos/oauth2-browser/package.json +18 -0
- package/demos/oauth2-browser/style.css +36 -0
- package/demos/vue/.babelrc +6 -0
- package/demos/vue/.env.example +8 -0
- package/demos/vue/README.md +17 -0
- package/demos/vue/index.html +21 -0
- package/demos/vue/package-lock.json +7236 -0
- package/demos/vue/package.json +39 -0
- package/demos/vue/src/assets/logo.svg +29 -0
- package/demos/vue/src/components/App.vue +302 -0
- package/demos/vue/src/components/Authenticate.vue +68 -0
- package/demos/vue/src/components/Loader.vue +216 -0
- package/demos/vue/src/main.js +75 -0
- package/demos/vue/webpack.config.js +84 -0
- package/docs/FAQ.md +28 -0
- package/docs/HISTORY.md +62 -0
- package/docs/acetate.config.js +214 -0
- package/docs/build-typedoc.js +301 -0
- package/docs/src/_layout.html +82 -0
- package/docs/src/api/_declaration.html +496 -0
- package/docs/src/api/_layout.html +127 -0
- package/docs/src/api/_package.html +13 -0
- package/docs/src/api/index.html +23 -0
- package/docs/src/guides/_layout.html +24 -0
- package/docs/src/guides/amd-requirejs-dojo.md +40 -0
- package/docs/src/guides/babel-and-rollup.md +30 -0
- package/docs/src/guides/babel-and-webpack.md +30 -0
- package/docs/src/guides/browser-authentication.md +9 -0
- package/docs/src/guides/browserify.md +9 -0
- package/docs/src/guides/cli-authentication.md +9 -0
- package/docs/src/guides/client-server-authentication.md +9 -0
- package/docs/src/guides/from-a-cdn.md +36 -0
- package/docs/src/guides/index.md +52 -0
- package/docs/src/guides/node.md +30 -0
- package/docs/src/guides/package-overview.md +8 -0
- package/docs/src/guides/server-authentication.md +9 -0
- package/docs/src/guides/typescript-and-webpack.md +9 -0
- package/docs/src/img/icons.png +0 -0
- package/docs/src/img/icons@2x.png +0 -0
- package/docs/src/index.html +12 -0
- package/docs/src/js/api-search.js +113 -0
- package/docs/src/js/index.js +1 -0
- package/docs/src/js/nav-toggle.js +41 -0
- package/docs/src/sass/_highlight.scss +96 -0
- package/docs/src/sass/_icons.scss +157 -0
- package/docs/src/sass/style.scss +169 -0
- package/jasmine.json +7 -0
- package/karma.conf.js +100 -0
- package/lerna.json +8 -0
- package/notes/README.md +88 -0
- package/package.json +91 -0
- package/packages/arcgis-rest-auth/README.md +64 -0
- package/packages/arcgis-rest-auth/package-lock.json +11 -0
- package/packages/arcgis-rest-auth/package.json +51 -0
- package/packages/arcgis-rest-auth/src/ApplicationSession.ts +91 -0
- package/packages/arcgis-rest-auth/src/UserSession.ts +829 -0
- package/packages/arcgis-rest-auth/src/authenticated-request-options.ts +21 -0
- package/packages/arcgis-rest-auth/src/fetch-token.ts +55 -0
- package/packages/arcgis-rest-auth/src/generate-token.ts +36 -0
- package/packages/arcgis-rest-auth/src/index.ts +5 -0
- package/packages/arcgis-rest-auth/test/ApplicationSession.test.ts +121 -0
- package/packages/arcgis-rest-auth/test/UserSession.test.ts +883 -0
- package/packages/arcgis-rest-auth/test/fetchToken.test.ts +76 -0
- package/packages/arcgis-rest-auth/test/generateToken.test.ts +36 -0
- package/packages/arcgis-rest-auth/test/utils.ts +11 -0
- package/packages/arcgis-rest-auth/tsconfig.json +6 -0
- package/packages/arcgis-rest-common-types/README.md +61 -0
- package/packages/arcgis-rest-common-types/package.json +38 -0
- package/packages/arcgis-rest-common-types/src/group.ts +51 -0
- package/packages/arcgis-rest-common-types/src/index.ts +467 -0
- package/packages/arcgis-rest-common-types/src/item.ts +45 -0
- package/packages/arcgis-rest-common-types/src/webmap.ts +1225 -0
- package/packages/arcgis-rest-common-types/tsconfig.json +11 -0
- package/packages/arcgis-rest-feature-service/README.md +70 -0
- package/packages/arcgis-rest-feature-service/package-lock.json +11 -0
- package/packages/arcgis-rest-feature-service/package.json +50 -0
- package/packages/arcgis-rest-feature-service/src/add.ts +82 -0
- package/packages/arcgis-rest-feature-service/src/addAttachment.ts +65 -0
- package/packages/arcgis-rest-feature-service/src/delete.ts +85 -0
- package/packages/arcgis-rest-feature-service/src/deleteAttachments.ts +68 -0
- package/packages/arcgis-rest-feature-service/src/getAttachments.ts +64 -0
- package/packages/arcgis-rest-feature-service/src/helpers.ts +77 -0
- package/packages/arcgis-rest-feature-service/src/index.ts +8 -0
- package/packages/arcgis-rest-feature-service/src/query.ts +174 -0
- package/packages/arcgis-rest-feature-service/src/update.ts +81 -0
- package/packages/arcgis-rest-feature-service/src/updateAttachment.ts +74 -0
- package/packages/arcgis-rest-feature-service/test/attachments.test.ts +179 -0
- package/packages/arcgis-rest-feature-service/test/features.test.ts +172 -0
- package/packages/arcgis-rest-feature-service/test/mocks/feature.ts +220 -0
- package/packages/arcgis-rest-feature-service/test/mocks/foo.txt +1 -0
- package/packages/arcgis-rest-feature-service/tsconfig.json +6 -0
- package/packages/arcgis-rest-geocoder/README.md +73 -0
- package/packages/arcgis-rest-geocoder/package-lock.json +11 -0
- package/packages/arcgis-rest-geocoder/package.json +52 -0
- package/packages/arcgis-rest-geocoder/src/bulk.ts +102 -0
- package/packages/arcgis-rest-geocoder/src/geocode.ts +117 -0
- package/packages/arcgis-rest-geocoder/src/helpers.ts +81 -0
- package/packages/arcgis-rest-geocoder/src/index.ts +4 -0
- package/packages/arcgis-rest-geocoder/src/reverse.ts +84 -0
- package/packages/arcgis-rest-geocoder/src/suggest.ts +72 -0
- package/packages/arcgis-rest-geocoder/test/geocoder.test.ts +510 -0
- package/packages/arcgis-rest-geocoder/test/mocks/responses.ts +588 -0
- package/packages/arcgis-rest-geocoder/tsconfig.json +6 -0
- package/packages/arcgis-rest-groups/README.md +64 -0
- package/packages/arcgis-rest-groups/package-lock.json +11 -0
- package/packages/arcgis-rest-groups/package.json +52 -0
- package/packages/arcgis-rest-groups/src/groups.ts +272 -0
- package/packages/arcgis-rest-groups/src/index.ts +1 -0
- package/packages/arcgis-rest-groups/test/groups.test.ts +280 -0
- package/packages/arcgis-rest-groups/test/mocks/responses.ts +137 -0
- package/packages/arcgis-rest-groups/tsconfig.json +6 -0
- package/packages/arcgis-rest-items/README.md +66 -0
- package/packages/arcgis-rest-items/package-lock.json +11 -0
- package/packages/arcgis-rest-items/package.json +52 -0
- package/packages/arcgis-rest-items/src/index.ts +1 -0
- package/packages/arcgis-rest-items/src/items.ts +498 -0
- package/packages/arcgis-rest-items/test/items.test.ts +1153 -0
- package/packages/arcgis-rest-items/test/mocks/foo.zip +0 -0
- package/packages/arcgis-rest-items/test/mocks/item.ts +30 -0
- package/packages/arcgis-rest-items/test/mocks/resources.ts +28 -0
- package/packages/arcgis-rest-items/test/mocks/search.ts +60 -0
- package/packages/arcgis-rest-items/tsconfig.json +6 -0
- package/packages/arcgis-rest-request/README.md +65 -0
- package/packages/arcgis-rest-request/package-lock.json +11 -0
- package/packages/arcgis-rest-request/package.json +42 -0
- package/packages/arcgis-rest-request/src/index.ts +10 -0
- package/packages/arcgis-rest-request/src/request.ts +259 -0
- package/packages/arcgis-rest-request/src/utils/ArcGISAuthError.ts +67 -0
- package/packages/arcgis-rest-request/src/utils/ArcGISRequestError.ts +73 -0
- package/packages/arcgis-rest-request/src/utils/ErrorTypes.ts +29 -0
- package/packages/arcgis-rest-request/src/utils/check-for-errors.ts +65 -0
- package/packages/arcgis-rest-request/src/utils/encode-form-data.ts +29 -0
- package/packages/arcgis-rest-request/src/utils/encode-query-string.ts +23 -0
- package/packages/arcgis-rest-request/src/utils/get-portal-url.ts +25 -0
- package/packages/arcgis-rest-request/src/utils/get-portal.ts +45 -0
- package/packages/arcgis-rest-request/src/utils/process-params.ts +99 -0
- package/packages/arcgis-rest-request/test/mocks/errors.ts +59 -0
- package/packages/arcgis-rest-request/test/mocks/geojson-feature-collection.ts +10 -0
- package/packages/arcgis-rest-request/test/mocks/portal.ts +109 -0
- package/packages/arcgis-rest-request/test/mocks/sharing-rest-info.ts +38 -0
- package/packages/arcgis-rest-request/test/mocks/webmap.ts +38 -0
- package/packages/arcgis-rest-request/test/request.test.ts +296 -0
- package/packages/arcgis-rest-request/test/utils/ArcGISAuthError.test.ts +167 -0
- package/packages/arcgis-rest-request/test/utils/ArcGISRequestError.test.ts +40 -0
- package/packages/arcgis-rest-request/test/utils/check-for-errors.test.ts +101 -0
- package/packages/arcgis-rest-request/test/utils/encode-form-data.test.ts +112 -0
- package/packages/arcgis-rest-request/test/utils/get-portal-url.test.ts +34 -0
- package/packages/arcgis-rest-request/test/utils/portal.test.ts +94 -0
- package/packages/arcgis-rest-request/test/utils/process-params.test.ts +190 -0
- package/packages/arcgis-rest-request/tsconfig.json +6 -0
- package/packages/arcgis-rest-sharing/README.md +67 -0
- package/packages/arcgis-rest-sharing/package-lock.json +11 -0
- package/packages/arcgis-rest-sharing/package.json +55 -0
- package/packages/arcgis-rest-sharing/src/access.ts +91 -0
- package/packages/arcgis-rest-sharing/src/group-sharing.ts +212 -0
- package/packages/arcgis-rest-sharing/src/helpers.ts +92 -0
- package/packages/arcgis-rest-sharing/src/index.ts +2 -0
- package/packages/arcgis-rest-sharing/test/access.test.ts +153 -0
- package/packages/arcgis-rest-sharing/test/group-sharing.test.ts +436 -0
- package/packages/arcgis-rest-sharing/test/mocks/sharing.ts +15 -0
- package/packages/arcgis-rest-sharing/tsconfig.json +6 -0
- package/packages/arcgis-rest-users/README.md +71 -0
- package/packages/arcgis-rest-users/package-lock.json +11 -0
- package/packages/arcgis-rest-users/package.json +51 -0
- package/packages/arcgis-rest-users/src/index.ts +1 -0
- package/packages/arcgis-rest-users/src/users.ts +70 -0
- package/packages/arcgis-rest-users/test/mocks/responses.ts +170 -0
- package/packages/arcgis-rest-users/test/users.test.ts +97 -0
- package/packages/arcgis-rest-users/tsconfig.json +6 -0
- package/support/FormData.d.ts +1 -0
- package/support/changelog.js +388 -0
- package/support/commit-template.txt +19 -0
- package/support/deploy-doc-site.js +16 -0
- package/support/publish.sh +40 -0
- package/support/test-helpers.js +8 -0
- package/tsconfig.json +69 -0
- package/tslint.json +14 -0
- package/umd-base-profile.js +82 -0
- package/umd-production-profile.js +13 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"name": "batch-geocoder",
|
3
|
+
"version": "1.6.0",
|
4
|
+
"description": "arcgis-rest-js batch geocode sample",
|
5
|
+
"main": "batch-geocode.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"repository": {
|
10
|
+
"type": "git",
|
11
|
+
"url": "git+https://github.com/Esri/arcgis-rest-js.git"
|
12
|
+
},
|
13
|
+
"keywords": [
|
14
|
+
"geocode",
|
15
|
+
"batch",
|
16
|
+
"arcgis",
|
17
|
+
"rest",
|
18
|
+
"js",
|
19
|
+
"arcgis-rest-js"
|
20
|
+
],
|
21
|
+
"author": "Max Payson (mpayson)",
|
22
|
+
"license": "Apache-2.0",
|
23
|
+
"private": true,
|
24
|
+
"bugs": {
|
25
|
+
"url": "https://github.com/Esri/arcgis-rest-js/issues"
|
26
|
+
},
|
27
|
+
"homepage": "https://github.com/Esri/arcgis-rest-js#readme",
|
28
|
+
"dependencies": {
|
29
|
+
"@esri/arcgis-rest-auth": "^1.6.0",
|
30
|
+
"@esri/arcgis-rest-common-types": "^1.6.0",
|
31
|
+
"@esri/arcgis-rest-geocoder": "^1.6.0",
|
32
|
+
"@esri/arcgis-rest-request": "^1.6.0",
|
33
|
+
"isomorphic-fetch": "^2.2.1",
|
34
|
+
"isomorphic-form-data": "^1.0.0",
|
35
|
+
"papaparse": "^4.3.6"
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Running this demo locally
|
2
|
+
|
3
|
+
1. Make sure you run `npm run bootstrap` in the root folder to setup the dependencies
|
4
|
+
2. Register a new app on https://developers.arcgis.com
|
5
|
+
3. Add a redirect URL of `http://localhost:3000/authenticate` to your app.
|
6
|
+
4. Copy the `config.json.template` file, rename it to `config.json`
|
7
|
+
5. Copy your apps client id into your new `config.json` file.
|
8
|
+
6. `npm start`
|
9
|
+
7. Visit http://localhost:3000/authorize to start the OAuth 2.0 process.
|
10
|
+
|
@@ -0,0 +1,388 @@
|
|
1
|
+
{
|
2
|
+
"requires": true,
|
3
|
+
"lockfileVersion": 1,
|
4
|
+
"dependencies": {
|
5
|
+
"accepts": {
|
6
|
+
"version": "1.3.3",
|
7
|
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz",
|
8
|
+
"integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=",
|
9
|
+
"requires": {
|
10
|
+
"mime-types": "~2.1.11",
|
11
|
+
"negotiator": "0.6.1"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"array-flatten": {
|
15
|
+
"version": "1.1.1",
|
16
|
+
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
17
|
+
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
|
18
|
+
},
|
19
|
+
"async": {
|
20
|
+
"version": "2.5.0",
|
21
|
+
"resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz",
|
22
|
+
"integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==",
|
23
|
+
"requires": {
|
24
|
+
"lodash": "^4.14.0"
|
25
|
+
}
|
26
|
+
},
|
27
|
+
"combined-stream": {
|
28
|
+
"version": "1.0.5",
|
29
|
+
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
|
30
|
+
"integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
|
31
|
+
"requires": {
|
32
|
+
"delayed-stream": "~1.0.0"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"content-disposition": {
|
36
|
+
"version": "0.5.2",
|
37
|
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
|
38
|
+
"integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
|
39
|
+
},
|
40
|
+
"content-type": {
|
41
|
+
"version": "1.0.2",
|
42
|
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz",
|
43
|
+
"integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0="
|
44
|
+
},
|
45
|
+
"cookie": {
|
46
|
+
"version": "0.3.1",
|
47
|
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
|
48
|
+
"integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
|
49
|
+
},
|
50
|
+
"cookie-signature": {
|
51
|
+
"version": "1.0.6",
|
52
|
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
53
|
+
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
|
54
|
+
},
|
55
|
+
"debug": {
|
56
|
+
"version": "2.6.8",
|
57
|
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
|
58
|
+
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
|
59
|
+
"requires": {
|
60
|
+
"ms": "2.0.0"
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"delayed-stream": {
|
64
|
+
"version": "1.0.0",
|
65
|
+
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
66
|
+
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
67
|
+
},
|
68
|
+
"depd": {
|
69
|
+
"version": "1.1.1",
|
70
|
+
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
|
71
|
+
"integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
|
72
|
+
},
|
73
|
+
"destroy": {
|
74
|
+
"version": "1.0.4",
|
75
|
+
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
|
76
|
+
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
|
77
|
+
},
|
78
|
+
"ee-first": {
|
79
|
+
"version": "1.1.1",
|
80
|
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
81
|
+
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
|
82
|
+
},
|
83
|
+
"encodeurl": {
|
84
|
+
"version": "1.0.1",
|
85
|
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
|
86
|
+
"integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA="
|
87
|
+
},
|
88
|
+
"encoding": {
|
89
|
+
"version": "0.1.12",
|
90
|
+
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
91
|
+
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
|
92
|
+
"requires": {
|
93
|
+
"iconv-lite": "~0.4.13"
|
94
|
+
}
|
95
|
+
},
|
96
|
+
"escape-html": {
|
97
|
+
"version": "1.0.3",
|
98
|
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
99
|
+
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
|
100
|
+
},
|
101
|
+
"etag": {
|
102
|
+
"version": "1.8.0",
|
103
|
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz",
|
104
|
+
"integrity": "sha1-b2Ma7zNtbEY2K1F2QETOIWvjwFE="
|
105
|
+
},
|
106
|
+
"express": {
|
107
|
+
"version": "4.15.4",
|
108
|
+
"resolved": "https://registry.npmjs.org/express/-/express-4.15.4.tgz",
|
109
|
+
"integrity": "sha1-Ay4iU0ic+PzgJma+yj0R7XotrtE=",
|
110
|
+
"requires": {
|
111
|
+
"accepts": "~1.3.3",
|
112
|
+
"array-flatten": "1.1.1",
|
113
|
+
"content-disposition": "0.5.2",
|
114
|
+
"content-type": "~1.0.2",
|
115
|
+
"cookie": "0.3.1",
|
116
|
+
"cookie-signature": "1.0.6",
|
117
|
+
"debug": "2.6.8",
|
118
|
+
"depd": "~1.1.1",
|
119
|
+
"encodeurl": "~1.0.1",
|
120
|
+
"escape-html": "~1.0.3",
|
121
|
+
"etag": "~1.8.0",
|
122
|
+
"finalhandler": "~1.0.4",
|
123
|
+
"fresh": "0.5.0",
|
124
|
+
"merge-descriptors": "1.0.1",
|
125
|
+
"methods": "~1.1.2",
|
126
|
+
"on-finished": "~2.3.0",
|
127
|
+
"parseurl": "~1.3.1",
|
128
|
+
"path-to-regexp": "0.1.7",
|
129
|
+
"proxy-addr": "~1.1.5",
|
130
|
+
"qs": "6.5.0",
|
131
|
+
"range-parser": "~1.2.0",
|
132
|
+
"send": "0.15.4",
|
133
|
+
"serve-static": "1.12.4",
|
134
|
+
"setprototypeof": "1.0.3",
|
135
|
+
"statuses": "~1.3.1",
|
136
|
+
"type-is": "~1.6.15",
|
137
|
+
"utils-merge": "1.0.0",
|
138
|
+
"vary": "~1.1.1"
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"finalhandler": {
|
142
|
+
"version": "1.0.4",
|
143
|
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.4.tgz",
|
144
|
+
"integrity": "sha512-16l/r8RgzlXKmFOhZpHBztvye+lAhC5SU7hXavnerC9UfZqZxxXl3BzL8MhffPT3kF61lj9Oav2LKEzh0ei7tg==",
|
145
|
+
"requires": {
|
146
|
+
"debug": "2.6.8",
|
147
|
+
"encodeurl": "~1.0.1",
|
148
|
+
"escape-html": "~1.0.3",
|
149
|
+
"on-finished": "~2.3.0",
|
150
|
+
"parseurl": "~1.3.1",
|
151
|
+
"statuses": "~1.3.1",
|
152
|
+
"unpipe": "~1.0.0"
|
153
|
+
}
|
154
|
+
},
|
155
|
+
"form-data": {
|
156
|
+
"version": "1.0.1",
|
157
|
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz",
|
158
|
+
"integrity": "sha1-rjFduaSQf6BlUCMEpm13M0de43w=",
|
159
|
+
"requires": {
|
160
|
+
"async": "^2.0.1",
|
161
|
+
"combined-stream": "^1.0.5",
|
162
|
+
"mime-types": "^2.1.11"
|
163
|
+
}
|
164
|
+
},
|
165
|
+
"forwarded": {
|
166
|
+
"version": "0.1.0",
|
167
|
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz",
|
168
|
+
"integrity": "sha1-Ge+YdMSuHCl7zweP3mOgm2aoQ2M="
|
169
|
+
},
|
170
|
+
"fresh": {
|
171
|
+
"version": "0.5.0",
|
172
|
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz",
|
173
|
+
"integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44="
|
174
|
+
},
|
175
|
+
"http-errors": {
|
176
|
+
"version": "1.6.2",
|
177
|
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
|
178
|
+
"integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
|
179
|
+
"requires": {
|
180
|
+
"depd": "1.1.1",
|
181
|
+
"inherits": "2.0.3",
|
182
|
+
"setprototypeof": "1.0.3",
|
183
|
+
"statuses": ">= 1.3.1 < 2"
|
184
|
+
}
|
185
|
+
},
|
186
|
+
"iconv-lite": {
|
187
|
+
"version": "0.4.19",
|
188
|
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
|
189
|
+
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
|
190
|
+
},
|
191
|
+
"inherits": {
|
192
|
+
"version": "2.0.3",
|
193
|
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
194
|
+
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
195
|
+
},
|
196
|
+
"ipaddr.js": {
|
197
|
+
"version": "1.4.0",
|
198
|
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz",
|
199
|
+
"integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA="
|
200
|
+
},
|
201
|
+
"is-stream": {
|
202
|
+
"version": "1.1.0",
|
203
|
+
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
204
|
+
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
|
205
|
+
},
|
206
|
+
"isomorphic-fetch": {
|
207
|
+
"version": "2.2.1",
|
208
|
+
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
|
209
|
+
"integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=",
|
210
|
+
"requires": {
|
211
|
+
"node-fetch": "^1.0.1",
|
212
|
+
"whatwg-fetch": ">=0.10.0"
|
213
|
+
}
|
214
|
+
},
|
215
|
+
"isomorphic-form-data": {
|
216
|
+
"version": "1.0.0",
|
217
|
+
"resolved": "https://registry.npmjs.org/isomorphic-form-data/-/isomorphic-form-data-1.0.0.tgz",
|
218
|
+
"integrity": "sha1-BEe+fg9rht7z05MDbPdmSpiRkQA=",
|
219
|
+
"requires": {
|
220
|
+
"form-data": "^1.0.0-rc3"
|
221
|
+
}
|
222
|
+
},
|
223
|
+
"lodash": {
|
224
|
+
"version": "4.17.4",
|
225
|
+
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
|
226
|
+
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
|
227
|
+
},
|
228
|
+
"media-typer": {
|
229
|
+
"version": "0.3.0",
|
230
|
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
231
|
+
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
|
232
|
+
},
|
233
|
+
"merge-descriptors": {
|
234
|
+
"version": "1.0.1",
|
235
|
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
236
|
+
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
|
237
|
+
},
|
238
|
+
"methods": {
|
239
|
+
"version": "1.1.2",
|
240
|
+
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
241
|
+
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
|
242
|
+
},
|
243
|
+
"mime": {
|
244
|
+
"version": "1.3.4",
|
245
|
+
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
|
246
|
+
"integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM="
|
247
|
+
},
|
248
|
+
"mime-db": {
|
249
|
+
"version": "1.29.0",
|
250
|
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz",
|
251
|
+
"integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg="
|
252
|
+
},
|
253
|
+
"mime-types": {
|
254
|
+
"version": "2.1.16",
|
255
|
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz",
|
256
|
+
"integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=",
|
257
|
+
"requires": {
|
258
|
+
"mime-db": "~1.29.0"
|
259
|
+
}
|
260
|
+
},
|
261
|
+
"ms": {
|
262
|
+
"version": "2.0.0",
|
263
|
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
264
|
+
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
265
|
+
},
|
266
|
+
"negotiator": {
|
267
|
+
"version": "0.6.1",
|
268
|
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
|
269
|
+
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
|
270
|
+
},
|
271
|
+
"node-fetch": {
|
272
|
+
"version": "1.7.3",
|
273
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
274
|
+
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
|
275
|
+
"requires": {
|
276
|
+
"encoding": "^0.1.11",
|
277
|
+
"is-stream": "^1.0.1"
|
278
|
+
}
|
279
|
+
},
|
280
|
+
"on-finished": {
|
281
|
+
"version": "2.3.0",
|
282
|
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
283
|
+
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
|
284
|
+
"requires": {
|
285
|
+
"ee-first": "1.1.1"
|
286
|
+
}
|
287
|
+
},
|
288
|
+
"parseurl": {
|
289
|
+
"version": "1.3.1",
|
290
|
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz",
|
291
|
+
"integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY="
|
292
|
+
},
|
293
|
+
"path-to-regexp": {
|
294
|
+
"version": "0.1.7",
|
295
|
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
296
|
+
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
|
297
|
+
},
|
298
|
+
"proxy-addr": {
|
299
|
+
"version": "1.1.5",
|
300
|
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz",
|
301
|
+
"integrity": "sha1-ccDuOxAt4/IC87ZPYI0XP8uhqRg=",
|
302
|
+
"requires": {
|
303
|
+
"forwarded": "~0.1.0",
|
304
|
+
"ipaddr.js": "1.4.0"
|
305
|
+
}
|
306
|
+
},
|
307
|
+
"qs": {
|
308
|
+
"version": "6.5.0",
|
309
|
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz",
|
310
|
+
"integrity": "sha512-fjVFjW9yhqMhVGwRExCXLhJKrLlkYSaxNWdyc9rmHlrVZbk35YHH312dFd7191uQeXkI3mKLZTIbSvIeFwFemg=="
|
311
|
+
},
|
312
|
+
"range-parser": {
|
313
|
+
"version": "1.2.0",
|
314
|
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
|
315
|
+
"integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
|
316
|
+
},
|
317
|
+
"send": {
|
318
|
+
"version": "0.15.4",
|
319
|
+
"resolved": "https://registry.npmjs.org/send/-/send-0.15.4.tgz",
|
320
|
+
"integrity": "sha1-mF+qPihLAnPHkzZKNcZze9k5Bbk=",
|
321
|
+
"requires": {
|
322
|
+
"debug": "2.6.8",
|
323
|
+
"depd": "~1.1.1",
|
324
|
+
"destroy": "~1.0.4",
|
325
|
+
"encodeurl": "~1.0.1",
|
326
|
+
"escape-html": "~1.0.3",
|
327
|
+
"etag": "~1.8.0",
|
328
|
+
"fresh": "0.5.0",
|
329
|
+
"http-errors": "~1.6.2",
|
330
|
+
"mime": "1.3.4",
|
331
|
+
"ms": "2.0.0",
|
332
|
+
"on-finished": "~2.3.0",
|
333
|
+
"range-parser": "~1.2.0",
|
334
|
+
"statuses": "~1.3.1"
|
335
|
+
}
|
336
|
+
},
|
337
|
+
"serve-static": {
|
338
|
+
"version": "1.12.4",
|
339
|
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.4.tgz",
|
340
|
+
"integrity": "sha1-m2qpjutyU8Tu3Ewfb9vKYJkBqWE=",
|
341
|
+
"requires": {
|
342
|
+
"encodeurl": "~1.0.1",
|
343
|
+
"escape-html": "~1.0.3",
|
344
|
+
"parseurl": "~1.3.1",
|
345
|
+
"send": "0.15.4"
|
346
|
+
}
|
347
|
+
},
|
348
|
+
"setprototypeof": {
|
349
|
+
"version": "1.0.3",
|
350
|
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
|
351
|
+
"integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
|
352
|
+
},
|
353
|
+
"statuses": {
|
354
|
+
"version": "1.3.1",
|
355
|
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
|
356
|
+
"integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
|
357
|
+
},
|
358
|
+
"type-is": {
|
359
|
+
"version": "1.6.15",
|
360
|
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz",
|
361
|
+
"integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=",
|
362
|
+
"requires": {
|
363
|
+
"media-typer": "0.3.0",
|
364
|
+
"mime-types": "~2.1.15"
|
365
|
+
}
|
366
|
+
},
|
367
|
+
"unpipe": {
|
368
|
+
"version": "1.0.0",
|
369
|
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
370
|
+
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
|
371
|
+
},
|
372
|
+
"utils-merge": {
|
373
|
+
"version": "1.0.0",
|
374
|
+
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz",
|
375
|
+
"integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg="
|
376
|
+
},
|
377
|
+
"vary": {
|
378
|
+
"version": "1.1.1",
|
379
|
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz",
|
380
|
+
"integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc="
|
381
|
+
},
|
382
|
+
"whatwg-fetch": {
|
383
|
+
"version": "2.0.3",
|
384
|
+
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz",
|
385
|
+
"integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ="
|
386
|
+
}
|
387
|
+
}
|
388
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"name": "@esri/arcgis-rest-demo-express",
|
3
|
+
"version": "1.6.0",
|
4
|
+
"private": true,
|
5
|
+
"description": "Demo of @esri/arcgis-rest-* packages in an Express server",
|
6
|
+
"author": "",
|
7
|
+
"license": "Apache-2.0",
|
8
|
+
"dependencies": {
|
9
|
+
"@esri/arcgis-rest-auth": "^1.6.0",
|
10
|
+
"@esri/arcgis-rest-request": "^1.6.0",
|
11
|
+
"express": "^4.15.4",
|
12
|
+
"isomorphic-fetch": "^2.2.1",
|
13
|
+
"isomorphic-form-data": "^1.0.0"
|
14
|
+
},
|
15
|
+
"scripts": {
|
16
|
+
"start": "node server.js"
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require("isomorphic-fetch");
|
2
|
+
require("isomorphic-form-data");
|
3
|
+
const express = require("express");
|
4
|
+
const app = express();
|
5
|
+
const { UserSession } = require("@esri/arcgis-rest-auth");
|
6
|
+
const { clientId } = require("./config.json");
|
7
|
+
|
8
|
+
const credentials = {
|
9
|
+
clientId,
|
10
|
+
redirectUri: "http://localhost:3000/authenticate"
|
11
|
+
};
|
12
|
+
|
13
|
+
app.get("/authorize", function(req, res) {
|
14
|
+
UserSession.authorize(credentials, res);
|
15
|
+
});
|
16
|
+
|
17
|
+
app.get("/authenticate", function(req, res) {
|
18
|
+
UserSession.exchangeAuthorizationCode(
|
19
|
+
credentials,
|
20
|
+
req.query.code
|
21
|
+
).then(session => {
|
22
|
+
res.send(session.token);
|
23
|
+
});
|
24
|
+
});
|
25
|
+
|
26
|
+
app.listen(3000, function() {
|
27
|
+
console.log("Example app listening on port 3000!");
|
28
|
+
});
|
@@ -0,0 +1,122 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
|
8
|
+
<div class="container-fluid">
|
9
|
+
<div class="row">
|
10
|
+
<div class="col-md-12">
|
11
|
+
<div class="jumbotron" >
|
12
|
+
<h1>query features!</h1>
|
13
|
+
<form id="queryForm" class="form-inline">
|
14
|
+
<div class="form-group">
|
15
|
+
<label for="resultRecordCount">Show up to</label>
|
16
|
+
<select id="resultRecordCount" class="form-control">
|
17
|
+
<option>5</option>
|
18
|
+
<option selected>10</option>
|
19
|
+
<option>25</option>
|
20
|
+
<option>50</option>
|
21
|
+
</select>
|
22
|
+
</div>
|
23
|
+
<div class="form-group">
|
24
|
+
<label for="queryField">records where</label>
|
25
|
+
<select id="queryField" class="form-control">
|
26
|
+
<option value="Cmn_Name">Type</option>
|
27
|
+
<option value="Condition">Condition</option>
|
28
|
+
</select>
|
29
|
+
</div>
|
30
|
+
<div class="form-group">
|
31
|
+
<label for="queryTerm">contains</label>
|
32
|
+
<input type="text" class="form-control" id="queryTerm" style="width: 200px" tabindex="0">
|
33
|
+
</div>
|
34
|
+
<button type="submit" class="btn btn-default">Go</button>
|
35
|
+
</form>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<div class="row">
|
40
|
+
<div class="col-md-12">
|
41
|
+
<table id="featureTable" class="table table-striped" style="display: none">
|
42
|
+
<thead>
|
43
|
+
<tr>
|
44
|
+
<th>Tree ID</th>
|
45
|
+
<th>Type</th>
|
46
|
+
<th>Condition</th>
|
47
|
+
</tr>
|
48
|
+
</thead>
|
49
|
+
<tbody id="tableBody">
|
50
|
+
</tbody>
|
51
|
+
</table>
|
52
|
+
<p id="suggestedTermsMessage">Try 'elm' or 'oak' for <strong>Type</strong>. Try 'fair' or 'good' for <strong>Condition</strong>.</p id="suggestedTermsMessage">
|
53
|
+
<p id="recordCountMessage"></p>
|
54
|
+
<p id="additionalRowsMessage" style="display: none" class="alert alert-warning">There are additional rows that meet your query criteria.</p>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<!-- load arcgis rest libraries -->
|
60
|
+
<script src="node_modules/@esri/arcgis-rest-request/dist/umd/request.umd.js"></script>
|
61
|
+
<script src="node_modules/@esri/arcgis-rest-feature-service/dist/umd/feature-service.umd.js"></script>
|
62
|
+
|
63
|
+
<script>
|
64
|
+
// respond when a user fills out the query form and
|
65
|
+
// either hits enter or clicks on the button
|
66
|
+
var queryForm = document.getElementById('queryForm');
|
67
|
+
queryForm.addEventListener('submit', function (e) {
|
68
|
+
// don't submit the form and reload the page (the default behavior)
|
69
|
+
e.preventDefault();
|
70
|
+
// get query params from form fields
|
71
|
+
var queryField = e.target.queryField.value;
|
72
|
+
var queryTerm = e.target.queryTerm.value;
|
73
|
+
var resultRecordCount = e.target.resultRecordCount.value;
|
74
|
+
// execute the query
|
75
|
+
queryTrees(queryField, queryTerm, resultRecordCount)
|
76
|
+
.then(function(response) {
|
77
|
+
// display the features in a table
|
78
|
+
refreshTable(response);
|
79
|
+
});
|
80
|
+
});
|
81
|
+
|
82
|
+
// perform query against the feature service and
|
83
|
+
// return a promise that will resolve with the response
|
84
|
+
function queryTrees(queryField, queryTerm, resultRecordCount) {
|
85
|
+
return arcgisRest.queryFeatures({
|
86
|
+
url: 'https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0',
|
87
|
+
// see: https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm
|
88
|
+
// for all possible query parameters
|
89
|
+
params: {
|
90
|
+
// NOTE: returnGeometry is set to false by default
|
91
|
+
where: queryField + ' LIKE \'%' + queryTerm + '%\'',
|
92
|
+
outFields: ['FID','Tree_ID','Cmn_Name','Condition'],
|
93
|
+
// limit to number of records that will show on the page
|
94
|
+
resultRecordCount: resultRecordCount
|
95
|
+
}
|
96
|
+
});
|
97
|
+
}
|
98
|
+
|
99
|
+
function refreshTable(response) {
|
100
|
+
var features = response.features;
|
101
|
+
// clear table
|
102
|
+
var tableBody = document.getElementById('tableBody');
|
103
|
+
tableBody.innerHTML = '';
|
104
|
+
// show returned features (if any)
|
105
|
+
var recordCount = features.length;
|
106
|
+
var featureTableDisplay = recordCount > 0 ? 'table' : 'none';
|
107
|
+
document.getElementById('featureTable').style.display = featureTableDisplay;
|
108
|
+
var rows = features.map(function (feature) {
|
109
|
+
return '<tr><td>' + feature.attributes.Tree_ID + '<td>' + feature.attributes.Cmn_Name + '</td><td>' + feature.attributes.Condition + '</td></tr>';
|
110
|
+
});
|
111
|
+
tableBody.innerHTML = rows.join('');
|
112
|
+
// show number of returned features
|
113
|
+
document.getElementById('recordCountMessage').innerHTML = recordCount + ' record(s) returned.';
|
114
|
+
// show/hide additional messages
|
115
|
+
var suggestedTermsMessageDisplay = recordCount > 0 ? 'none' : 'block';
|
116
|
+
var additionalRowsMessageDisplay = response.exceededTransferLimit ? 'block' : 'none';
|
117
|
+
document.getElementById('suggestedTermsMessage').style.display = suggestedTermsMessageDisplay;
|
118
|
+
document.getElementById('additionalRowsMessage').style.display = additionalRowsMessageDisplay;
|
119
|
+
}
|
120
|
+
</script>
|
121
|
+
</body>
|
122
|
+
</html>
|