delectusnon 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 +33 -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 +15 -0
- package/demos/batch-geocoder-node/batch-geocode.js +118 -0
- package/demos/batch-geocoder-node/config-template.js +18 -0
- package/demos/batch-geocoder-node/package-lock.json +116 -0
- package/demos/batch-geocoder-node/package.json +39 -0
- package/demos/express/README.md +10 -0
- package/demos/express/config.json.template +3 -0
- package/demos/express/package-lock.json +473 -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 +182 -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/oauth2-browser-retry/README.md +25 -0
- package/demos/oauth2-browser-retry/authenticate.html +21 -0
- package/demos/oauth2-browser-retry/index.html +116 -0
- package/demos/oauth2-browser-retry/logo.svg +4 -0
- package/demos/vue/.env.example +11 -0
- package/demos/vue/.eslintrc.js +17 -0
- package/demos/vue/.postcssrc.js +5 -0
- package/demos/vue/README.md +17 -0
- package/demos/vue/babel.config.js +3 -0
- package/demos/vue/package-lock.json +11323 -0
- package/demos/vue/package.json +33 -0
- package/demos/vue/public/favicon.ico +0 -0
- package/demos/vue/public/index.html +24 -0
- package/demos/vue/src/assets/logo.svg +29 -0
- package/demos/vue/src/components/App.vue +308 -0
- package/demos/vue/src/components/Authenticate.vue +65 -0
- package/demos/vue/src/components/Loader.vue +230 -0
- package/demos/vue/src/main.js +92 -0
- package/docs/FAQ.md +28 -0
- package/docs/HISTORY.md +62 -0
- package/docs/acetate.config.js +223 -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 +31 -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 +70 -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 +112 -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 +88 -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 +109 -0
- package/packages/arcgis-rest-auth/src/UserSession.ts +873 -0
- package/packages/arcgis-rest-auth/src/authenticated-request-options.ts +24 -0
- package/packages/arcgis-rest-auth/src/fetch-token.ts +52 -0
- package/packages/arcgis-rest-auth/src/generate-token.ts +39 -0
- package/packages/arcgis-rest-auth/src/index.ts +8 -0
- package/packages/arcgis-rest-auth/test/ApplicationSession.test.ts +124 -0
- package/packages/arcgis-rest-auth/test/UserSession.test.ts +995 -0
- package/packages/arcgis-rest-auth/test/fetchToken.test.ts +112 -0
- package/packages/arcgis-rest-auth/test/generateToken.test.ts +130 -0
- package/packages/arcgis-rest-auth/test/utils.ts +14 -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 +54 -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 +1232 -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 +81 -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 +80 -0
- package/packages/arcgis-rest-feature-service/src/index.ts +12 -0
- package/packages/arcgis-rest-feature-service/src/query.ts +172 -0
- package/packages/arcgis-rest-feature-service/src/queryRelated.ts +91 -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 +203 -0
- package/packages/arcgis-rest-feature-service/test/features.test.ts +252 -0
- package/packages/arcgis-rest-feature-service/test/mocks/feature.ts +279 -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-feature-service-admin/README.md +66 -0
- package/packages/arcgis-rest-feature-service-admin/package-lock.json +11 -0
- package/packages/arcgis-rest-feature-service-admin/package.json +53 -0
- package/packages/arcgis-rest-feature-service-admin/src/addTo.ts +70 -0
- package/packages/arcgis-rest-feature-service-admin/src/create.ts +195 -0
- package/packages/arcgis-rest-feature-service-admin/src/index.ts +2 -0
- package/packages/arcgis-rest-feature-service-admin/test/addTo.test.ts +310 -0
- package/packages/arcgis-rest-feature-service-admin/test/create.test.ts +412 -0
- package/packages/arcgis-rest-feature-service-admin/test/mocks/move.ts +14 -0
- package/packages/arcgis-rest-feature-service-admin/test/mocks/service.ts +72 -0
- package/packages/arcgis-rest-feature-service-admin/tsconfig.json +6 -0
- package/packages/arcgis-rest-geocoder/README.md +79 -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 +79 -0
- package/packages/arcgis-rest-geocoder/src/index.ts +8 -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/bulk.test.ts +113 -0
- package/packages/arcgis-rest-geocoder/test/geocode.test.ts +121 -0
- package/packages/arcgis-rest-geocoder/test/helpers.test.ts +113 -0
- package/packages/arcgis-rest-geocoder/test/mocks/responses.ts +591 -0
- package/packages/arcgis-rest-geocoder/test/reverse.test.ts +126 -0
- package/packages/arcgis-rest-geocoder/test/suggest.test.ts +77 -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/create.ts +34 -0
- package/packages/arcgis-rest-groups/src/get.ts +95 -0
- package/packages/arcgis-rest-groups/src/helpers.ts +26 -0
- package/packages/arcgis-rest-groups/src/index.ts +11 -0
- package/packages/arcgis-rest-groups/src/notification.ts +77 -0
- package/packages/arcgis-rest-groups/src/protect.ts +40 -0
- package/packages/arcgis-rest-groups/src/remove.ts +23 -0
- package/packages/arcgis-rest-groups/src/search.ts +64 -0
- package/packages/arcgis-rest-groups/src/update.ts +36 -0
- package/packages/arcgis-rest-groups/test/crud.test.ts +104 -0
- package/packages/arcgis-rest-groups/test/get.test.ts +101 -0
- package/packages/arcgis-rest-groups/test/mocks/responses.ts +141 -0
- package/packages/arcgis-rest-groups/test/notification.test.ts +102 -0
- package/packages/arcgis-rest-groups/test/protect.test.ts +64 -0
- package/packages/arcgis-rest-groups/test/search.test.ts +85 -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/add.ts +103 -0
- package/packages/arcgis-rest-items/src/create.ts +110 -0
- package/packages/arcgis-rest-items/src/get.ts +79 -0
- package/packages/arcgis-rest-items/src/helpers.ts +147 -0
- package/packages/arcgis-rest-items/src/index.ts +11 -0
- package/packages/arcgis-rest-items/src/protect.ts +38 -0
- package/packages/arcgis-rest-items/src/remove.ts +58 -0
- package/packages/arcgis-rest-items/src/search.ts +78 -0
- package/packages/arcgis-rest-items/src/update.ts +134 -0
- package/packages/arcgis-rest-items/test/add.test.ts +256 -0
- package/packages/arcgis-rest-items/test/create.test.ts +371 -0
- package/packages/arcgis-rest-items/test/get.test.ts +181 -0
- package/packages/arcgis-rest-items/test/mocks/foo.zip +0 -0
- package/packages/arcgis-rest-items/test/mocks/item.ts +33 -0
- package/packages/arcgis-rest-items/test/mocks/resources.ts +31 -0
- package/packages/arcgis-rest-items/test/mocks/search.ts +63 -0
- package/packages/arcgis-rest-items/test/protect.test.ts +122 -0
- package/packages/arcgis-rest-items/test/remove.test.ts +161 -0
- package/packages/arcgis-rest-items/test/search.test.ts +159 -0
- package/packages/arcgis-rest-items/test/update.test.ts +450 -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 +13 -0
- package/packages/arcgis-rest-request/src/request.ts +293 -0
- package/packages/arcgis-rest-request/src/utils/ArcGISAuthError.ts +67 -0
- package/packages/arcgis-rest-request/src/utils/ArcGISRequestError.ts +76 -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 +34 -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 +68 -0
- package/packages/arcgis-rest-request/test/mocks/geojson-feature-collection.ts +13 -0
- package/packages/arcgis-rest-request/test/mocks/portal.ts +112 -0
- package/packages/arcgis-rest-request/test/mocks/sharing-rest-info.ts +41 -0
- package/packages/arcgis-rest-request/test/mocks/webmap.ts +41 -0
- package/packages/arcgis-rest-request/test/request.test.ts +299 -0
- package/packages/arcgis-rest-request/test/utils/ArcGISAuthError.test.ts +170 -0
- package/packages/arcgis-rest-request/test/utils/ArcGISRequestError.test.ts +51 -0
- package/packages/arcgis-rest-request/test/utils/check-for-errors.test.ts +111 -0
- package/packages/arcgis-rest-request/test/utils/encode-form-data.test.ts +133 -0
- package/packages/arcgis-rest-request/test/utils/get-portal-url.test.ts +37 -0
- package/packages/arcgis-rest-request/test/utils/portal.test.ts +97 -0
- package/packages/arcgis-rest-request/test/utils/process-params.test.ts +193 -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 +57 -0
- package/packages/arcgis-rest-sharing/src/access.ts +85 -0
- package/packages/arcgis-rest-sharing/src/group-sharing.ts +211 -0
- package/packages/arcgis-rest-sharing/src/helpers.ts +82 -0
- package/packages/arcgis-rest-sharing/src/index.ts +5 -0
- package/packages/arcgis-rest-sharing/test/access.test.ts +154 -0
- package/packages/arcgis-rest-sharing/test/group-sharing.test.ts +566 -0
- package/packages/arcgis-rest-sharing/test/helpers.test.ts +55 -0
- package/packages/arcgis-rest-sharing/test/mocks/sharing.ts +18 -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/get.ts +69 -0
- package/packages/arcgis-rest-users/src/index.ts +6 -0
- package/packages/arcgis-rest-users/src/invitation.ts +166 -0
- package/packages/arcgis-rest-users/src/notification.ts +73 -0
- package/packages/arcgis-rest-users/test/get.test.ts +99 -0
- package/packages/arcgis-rest-users/test/invitation.test.ts +169 -0
- package/packages/arcgis-rest-users/test/mocks/invitation.ts +70 -0
- package/packages/arcgis-rest-users/test/mocks/notification.ts +34 -0
- package/packages/arcgis-rest-users/test/mocks/user.ts +173 -0
- package/packages/arcgis-rest-users/test/notification.test.ts +83 -0
- package/packages/arcgis-rest-users/tsconfig.json +6 -0
- package/support/changelog.js +394 -0
- package/support/deploy-doc-site.js +16 -0
- package/support/publish.sh +43 -0
- package/support/test-helpers.js +8 -0
- package/tsconfig.json +69 -0
- package/tslint.json +15 -0
- package/umd-base-profile.js +82 -0
- package/umd-production-profile.js +13 -0
@@ -0,0 +1,113 @@
|
|
1
|
+
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
2
|
+
* Apache-2.0 */
|
3
|
+
|
4
|
+
import { serviceInfo, getGeocodeService } from "../src/helpers";
|
5
|
+
|
6
|
+
import * as fetchMock from "fetch-mock";
|
7
|
+
|
8
|
+
import { SharingInfo } from "./mocks/responses";
|
9
|
+
|
10
|
+
const customGeocoderUrl =
|
11
|
+
"https://foo.com/arcgis/rest/services/Custom/GeocodeServer/";
|
12
|
+
|
13
|
+
describe("geocode", () => {
|
14
|
+
afterEach(fetchMock.restore);
|
15
|
+
|
16
|
+
it("should retrieve metadata from the World Geocoding Service", done => {
|
17
|
+
fetchMock.once("*", SharingInfo);
|
18
|
+
|
19
|
+
getGeocodeService()
|
20
|
+
.then(response => {
|
21
|
+
expect(fetchMock.called()).toEqual(true);
|
22
|
+
const [url, options]: [string, RequestInit] = fetchMock.lastCall("*");
|
23
|
+
expect(url).toEqual(
|
24
|
+
"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/?f=json"
|
25
|
+
);
|
26
|
+
expect(options.method).toBe("GET");
|
27
|
+
// expect(response).toEqual(SharingInfo); // need to fix something in order introspect the whole response
|
28
|
+
expect(response.currentVersion).toEqual(10.41);
|
29
|
+
expect(response.serviceDescription).toEqual(
|
30
|
+
"Sample geocoder for San Diego, California, USA"
|
31
|
+
);
|
32
|
+
done();
|
33
|
+
})
|
34
|
+
.catch(e => {
|
35
|
+
fail(e);
|
36
|
+
});
|
37
|
+
});
|
38
|
+
|
39
|
+
it("should make POST request for metadata from the World Geocoding Service", done => {
|
40
|
+
fetchMock.once("*", SharingInfo);
|
41
|
+
|
42
|
+
getGeocodeService({ httpMethod: "POST" })
|
43
|
+
.then(response => {
|
44
|
+
expect(fetchMock.called()).toEqual(true);
|
45
|
+
const [url, options]: [string, RequestInit] = fetchMock.lastCall("*");
|
46
|
+
expect(url).toEqual(
|
47
|
+
"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/"
|
48
|
+
);
|
49
|
+
expect(options.method).toBe("POST");
|
50
|
+
expect(options.body).toContain("f=json");
|
51
|
+
// expect(paramsSpy).toHaveBeenCalledWith("f", "json");
|
52
|
+
// expect(response).toEqual(SharingInfo); // need to fix something in order introspect the whole response
|
53
|
+
expect(response.currentVersion).toEqual(10.41);
|
54
|
+
expect(response.serviceDescription).toEqual(
|
55
|
+
"Sample geocoder for San Diego, California, USA"
|
56
|
+
);
|
57
|
+
done();
|
58
|
+
})
|
59
|
+
.catch(e => {
|
60
|
+
fail(e);
|
61
|
+
});
|
62
|
+
});
|
63
|
+
|
64
|
+
it("should retrieve metadata from custom geocoding services", done => {
|
65
|
+
fetchMock.once("*", SharingInfo);
|
66
|
+
|
67
|
+
getGeocodeService({ endpoint: customGeocoderUrl })
|
68
|
+
.then(response => {
|
69
|
+
expect(fetchMock.called()).toEqual(true);
|
70
|
+
const [url, options]: [string, RequestInit] = fetchMock.lastCall("*");
|
71
|
+
expect(url).toEqual(
|
72
|
+
"https://foo.com/arcgis/rest/services/Custom/GeocodeServer/?f=json"
|
73
|
+
);
|
74
|
+
expect(options.method).toBe("GET");
|
75
|
+
// how to introspect the whole response?
|
76
|
+
// expect(response).toEqual(SharingInfo);
|
77
|
+
expect(response.currentVersion).toEqual(10.41);
|
78
|
+
expect(response.serviceDescription).toEqual(
|
79
|
+
"Sample geocoder for San Diego, California, USA"
|
80
|
+
);
|
81
|
+
done();
|
82
|
+
})
|
83
|
+
.catch(e => {
|
84
|
+
fail(e);
|
85
|
+
});
|
86
|
+
});
|
87
|
+
|
88
|
+
it("should retrieve metadata from the World Geocoding Service using the old method name", done => {
|
89
|
+
fetchMock.once("*", SharingInfo);
|
90
|
+
|
91
|
+
// intercept deprecation warning
|
92
|
+
console.warn = jasmine.createSpy("warning");
|
93
|
+
|
94
|
+
serviceInfo()
|
95
|
+
.then(response => {
|
96
|
+
expect(fetchMock.called()).toEqual(true);
|
97
|
+
const [url, options]: [string, RequestInit] = fetchMock.lastCall("*");
|
98
|
+
expect(url).toEqual(
|
99
|
+
"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/?f=json"
|
100
|
+
);
|
101
|
+
expect(options.method).toBe("GET");
|
102
|
+
// expect(response).toEqual(SharingInfo); // need to fix something in order introspect the whole response
|
103
|
+
expect(response.currentVersion).toEqual(10.41);
|
104
|
+
expect(response.serviceDescription).toEqual(
|
105
|
+
"Sample geocoder for San Diego, California, USA"
|
106
|
+
);
|
107
|
+
done();
|
108
|
+
})
|
109
|
+
.catch(e => {
|
110
|
+
fail(e);
|
111
|
+
});
|
112
|
+
});
|
113
|
+
});
|
@@ -0,0 +1,591 @@
|
|
1
|
+
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
|
2
|
+
* Apache-2.0 */
|
3
|
+
|
4
|
+
export const FindAddressCandidates = {
|
5
|
+
spatialReference: {
|
6
|
+
wkid: 4326,
|
7
|
+
latestWkid: 4326
|
8
|
+
},
|
9
|
+
candidates: [
|
10
|
+
{
|
11
|
+
address: "LAX",
|
12
|
+
location: {
|
13
|
+
x: -118.40896999999995,
|
14
|
+
y: 33.942510000000027
|
15
|
+
},
|
16
|
+
score: 100,
|
17
|
+
attributes: {},
|
18
|
+
extent: {
|
19
|
+
xmin: -118.43396999999996,
|
20
|
+
ymin: 33.917510000000028,
|
21
|
+
xmax: -118.38396999999995,
|
22
|
+
ymax: 33.967510000000026
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
address: "LAX",
|
27
|
+
location: {
|
28
|
+
x: -118.39223999999996,
|
29
|
+
y: 33.945610000000045
|
30
|
+
},
|
31
|
+
score: 100,
|
32
|
+
attributes: {},
|
33
|
+
extent: {
|
34
|
+
xmin: -118.39723999999995,
|
35
|
+
ymin: 33.940610000000042,
|
36
|
+
xmax: -118.38723999999996,
|
37
|
+
ymax: 33.950610000000047
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
address: "Lax, Georgia",
|
42
|
+
location: {
|
43
|
+
x: -83.121539999999982,
|
44
|
+
y: 31.473250000000064
|
45
|
+
},
|
46
|
+
score: 100,
|
47
|
+
attributes: {},
|
48
|
+
extent: {
|
49
|
+
xmin: -83.141539999999978,
|
50
|
+
ymin: 31.453250000000065,
|
51
|
+
xmax: -83.101539999999986,
|
52
|
+
ymax: 31.493250000000064
|
53
|
+
}
|
54
|
+
}
|
55
|
+
]
|
56
|
+
};
|
57
|
+
|
58
|
+
export const Suggest = {
|
59
|
+
suggestions: [
|
60
|
+
{
|
61
|
+
text: "LAX, Los Angeles, CA, USA",
|
62
|
+
magicKey:
|
63
|
+
"dHA9MCNsb2M9ODU0NzQzNCNsbmc9MzMjcGw9MzcyMzM5OCNsYnM9MTQ6MTQwODQ0MjY=",
|
64
|
+
isCollection: false
|
65
|
+
},
|
66
|
+
{
|
67
|
+
text: "LAX, W Century Blvd, Los Angeles, CA, 90045, USA",
|
68
|
+
magicKey:
|
69
|
+
"dHA9MCNsb2M9NTM2MDg5NyNsbmc9MzMjcGw9MTcyOTI5NCNsYnM9MTQ6MTQwODQ0MjY=",
|
70
|
+
isCollection: false
|
71
|
+
},
|
72
|
+
{
|
73
|
+
text: "Laxou, Meurthe-et-Moselle, Alsace-Champagne-Ardenne-Lorraine, FRA",
|
74
|
+
magicKey:
|
75
|
+
"dHA9MCNsb2M9MTI0NTI0ODMjbG5nPTQxI3BsPTYxMzg0NDAjbGJzPTE0OjE0NTM3NzIw",
|
76
|
+
isCollection: false
|
77
|
+
},
|
78
|
+
{
|
79
|
+
text: "Laxå, SWE",
|
80
|
+
magicKey:
|
81
|
+
"dHA9MCNsb2M9NDA5NTk3NTEjbG5nPTEzOCNwbD0zNzQzODEyNyNsYnM9MTQ6MTQ1Mzc4NjI=",
|
82
|
+
isCollection: false
|
83
|
+
},
|
84
|
+
{
|
85
|
+
text: "Laxmanchanda, Adilabad, Telangana, IND",
|
86
|
+
magicKey:
|
87
|
+
"dHA9MCNsb2M9MzExMDM2MzEjbG5nPTMzI3BsPTIyNjA1MDczI2xicz0xNDoxNDUyOTc5MA==",
|
88
|
+
isCollection: false
|
89
|
+
}
|
90
|
+
]
|
91
|
+
};
|
92
|
+
|
93
|
+
export const ReverseGeocode = {
|
94
|
+
address: {
|
95
|
+
Match_addr: "LA Airport",
|
96
|
+
LongLabel: "LA Airport, Los Angeles, CA, USA",
|
97
|
+
ShortLabel: "LA Airport",
|
98
|
+
Addr_type: "POI",
|
99
|
+
Type: "Airport",
|
100
|
+
PlaceName: "LA Airport",
|
101
|
+
AddNum: "",
|
102
|
+
Address: "",
|
103
|
+
Block: "",
|
104
|
+
Sector: "",
|
105
|
+
Neighborhood: "",
|
106
|
+
District: "",
|
107
|
+
City: "Los Angeles",
|
108
|
+
MetroArea: "",
|
109
|
+
Subregion: "Los Angeles County",
|
110
|
+
Region: "California",
|
111
|
+
Territory: "",
|
112
|
+
Postal: "",
|
113
|
+
PostalExt: "",
|
114
|
+
CountryCode: "USA"
|
115
|
+
},
|
116
|
+
location: {
|
117
|
+
x: -118.40896999999995,
|
118
|
+
y: 33.942510000000027,
|
119
|
+
spatialReference: {
|
120
|
+
wkid: 4326,
|
121
|
+
latestWkid: 4326
|
122
|
+
}
|
123
|
+
}
|
124
|
+
};
|
125
|
+
|
126
|
+
export const GeocodeAddresses = {
|
127
|
+
spatialReference: { wkid: 4326, latestWkid: 4326 },
|
128
|
+
locations: [
|
129
|
+
{
|
130
|
+
address: "380 New York St, Redlands, California, 92373",
|
131
|
+
location: { x: -117.19567031799994, y: 34.056488119000051 },
|
132
|
+
score: 100,
|
133
|
+
attributes: {
|
134
|
+
ResultID: 1,
|
135
|
+
Loc_name: "World",
|
136
|
+
Status: "M",
|
137
|
+
Score: 100,
|
138
|
+
Match_addr: "380 New York St, Redlands, California, 92373",
|
139
|
+
LongLabel: "380 New York St, Redlands, CA, 92373, USA",
|
140
|
+
ShortLabel: "380 New York St",
|
141
|
+
Addr_type: "PointAddress",
|
142
|
+
Type: "",
|
143
|
+
PlaceName: "",
|
144
|
+
Place_addr: "380 New York St, Redlands, California, 92373",
|
145
|
+
Phone: "",
|
146
|
+
URL: "",
|
147
|
+
Rank: 20,
|
148
|
+
AddBldg: "",
|
149
|
+
AddNum: "380",
|
150
|
+
AddNumFrom: "",
|
151
|
+
AddNumTo: "",
|
152
|
+
AddRange: "",
|
153
|
+
Side: "R",
|
154
|
+
StPreDir: "",
|
155
|
+
StPreType: "",
|
156
|
+
StName: "New York",
|
157
|
+
StType: "St",
|
158
|
+
StDir: "",
|
159
|
+
BldgType: "",
|
160
|
+
BldgName: "",
|
161
|
+
LevelType: "",
|
162
|
+
LevelName: "",
|
163
|
+
UnitType: "",
|
164
|
+
UnitName: "",
|
165
|
+
SubAddr: "",
|
166
|
+
StAddr: "380 New York St",
|
167
|
+
Block: "",
|
168
|
+
Sector: "",
|
169
|
+
Nbrhd: "West Redlands",
|
170
|
+
District: "",
|
171
|
+
City: "Redlands",
|
172
|
+
MetroArea: "Inland Empire",
|
173
|
+
Subregion: "San Bernardino",
|
174
|
+
Region: "California",
|
175
|
+
RegionAbbr: "CA",
|
176
|
+
Territory: "",
|
177
|
+
Zone: "",
|
178
|
+
Postal: "92373",
|
179
|
+
PostalExt: "",
|
180
|
+
Country: "USA",
|
181
|
+
LangCode: "ENG",
|
182
|
+
Distance: 0,
|
183
|
+
X: -117.1956703176181,
|
184
|
+
Y: 34.056488119308924,
|
185
|
+
DisplayX: -117.1953135,
|
186
|
+
DisplayY: 34.056108000000009,
|
187
|
+
Xmin: -117.1963135,
|
188
|
+
Xmax: -117.19431349999999,
|
189
|
+
Ymin: 34.055108000000011,
|
190
|
+
Ymax: 34.057108000000007
|
191
|
+
}
|
192
|
+
},
|
193
|
+
{
|
194
|
+
address: "1 World Way, Los Angeles, California, 90045",
|
195
|
+
location: { x: -118.39751976799994, y: 33.944172212000069 },
|
196
|
+
score: 100,
|
197
|
+
attributes: {
|
198
|
+
ResultID: 2,
|
199
|
+
Loc_name: "World",
|
200
|
+
Status: "M",
|
201
|
+
Score: 100,
|
202
|
+
Match_addr: "1 World Way, Los Angeles, California, 90045",
|
203
|
+
LongLabel: "1 World Way, Los Angeles, CA, 90045, USA",
|
204
|
+
ShortLabel: "1 World Way",
|
205
|
+
Addr_type: "StreetAddress",
|
206
|
+
Type: "",
|
207
|
+
PlaceName: "",
|
208
|
+
Place_addr: "1 World Way, Los Angeles, California, 90045",
|
209
|
+
Phone: "",
|
210
|
+
URL: "",
|
211
|
+
Rank: 20,
|
212
|
+
AddBldg: "",
|
213
|
+
AddNum: "1",
|
214
|
+
AddNumFrom: "1",
|
215
|
+
AddNumTo: "57",
|
216
|
+
AddRange: "1-57",
|
217
|
+
Side: "R",
|
218
|
+
StPreDir: "",
|
219
|
+
StPreType: "",
|
220
|
+
StName: "World",
|
221
|
+
StType: "Way",
|
222
|
+
StDir: "",
|
223
|
+
BldgType: "",
|
224
|
+
BldgName: "",
|
225
|
+
LevelType: "",
|
226
|
+
LevelName: "",
|
227
|
+
UnitType: "",
|
228
|
+
UnitName: "",
|
229
|
+
SubAddr: "",
|
230
|
+
StAddr: "1 World Way",
|
231
|
+
Block: "",
|
232
|
+
Sector: "",
|
233
|
+
Nbrhd: "Westchester",
|
234
|
+
District: "",
|
235
|
+
City: "Los Angeles",
|
236
|
+
MetroArea: "Los Angeles Metro Area",
|
237
|
+
Subregion: "Los Angeles",
|
238
|
+
Region: "California",
|
239
|
+
RegionAbbr: "CA",
|
240
|
+
Territory: "",
|
241
|
+
Zone: "",
|
242
|
+
Postal: "90045",
|
243
|
+
PostalExt: "",
|
244
|
+
Country: "USA",
|
245
|
+
LangCode: "ENG",
|
246
|
+
Distance: 0,
|
247
|
+
X: -118.39751976816108,
|
248
|
+
Y: 33.944172211706103,
|
249
|
+
DisplayX: -118.39751976816108,
|
250
|
+
DisplayY: 33.944172211706103,
|
251
|
+
Xmin: -118.39851976816108,
|
252
|
+
Xmax: -118.39651976816107,
|
253
|
+
Ymin: 33.943172211706106,
|
254
|
+
Ymax: 33.945172211706101
|
255
|
+
}
|
256
|
+
}
|
257
|
+
]
|
258
|
+
};
|
259
|
+
|
260
|
+
export const SharingInfo = {
|
261
|
+
currentVersion: 10.41,
|
262
|
+
serviceDescription: "Sample geocoder for San Diego, California, USA",
|
263
|
+
addressFields: [
|
264
|
+
{
|
265
|
+
name: "Address",
|
266
|
+
type: "esriFieldTypeString",
|
267
|
+
alias: "Address",
|
268
|
+
required: false,
|
269
|
+
length: 100
|
270
|
+
},
|
271
|
+
{
|
272
|
+
name: "Neighborhood",
|
273
|
+
type: "esriFieldTypeString",
|
274
|
+
alias: "Neighborhood",
|
275
|
+
required: false,
|
276
|
+
length: 50
|
277
|
+
},
|
278
|
+
{
|
279
|
+
name: "City",
|
280
|
+
type: "esriFieldTypeString",
|
281
|
+
alias: "City",
|
282
|
+
required: false,
|
283
|
+
length: 100
|
284
|
+
},
|
285
|
+
{
|
286
|
+
name: "Subregion",
|
287
|
+
type: "esriFieldTypeString",
|
288
|
+
alias: "Subregion",
|
289
|
+
required: false,
|
290
|
+
length: 50
|
291
|
+
},
|
292
|
+
{
|
293
|
+
name: "Region",
|
294
|
+
type: "esriFieldTypeString",
|
295
|
+
alias: "Region",
|
296
|
+
required: false,
|
297
|
+
length: 75
|
298
|
+
},
|
299
|
+
{
|
300
|
+
name: "Postal",
|
301
|
+
type: "esriFieldTypeString",
|
302
|
+
alias: "Postal",
|
303
|
+
required: false,
|
304
|
+
length: 15
|
305
|
+
},
|
306
|
+
{
|
307
|
+
name: "PostalExt",
|
308
|
+
type: "esriFieldTypeString",
|
309
|
+
alias: "PostalExt",
|
310
|
+
required: false,
|
311
|
+
length: 12
|
312
|
+
},
|
313
|
+
{
|
314
|
+
name: "Country",
|
315
|
+
type: "esriFieldTypeString",
|
316
|
+
alias: "Country",
|
317
|
+
required: false,
|
318
|
+
length: 50
|
319
|
+
}
|
320
|
+
],
|
321
|
+
singleLineAddressField: {
|
322
|
+
name: "SingleLine",
|
323
|
+
type: "esriFieldTypeString",
|
324
|
+
alias: "Single Line Input",
|
325
|
+
required: false,
|
326
|
+
length: 250
|
327
|
+
},
|
328
|
+
candidateFields: [
|
329
|
+
{
|
330
|
+
name: "Loc_name",
|
331
|
+
type: "esriFieldTypeString",
|
332
|
+
alias: "Loc_name",
|
333
|
+
required: false,
|
334
|
+
length: 29
|
335
|
+
},
|
336
|
+
{
|
337
|
+
name: "Shape",
|
338
|
+
type: "esriFieldTypeGeometry",
|
339
|
+
alias: "Shape",
|
340
|
+
required: false
|
341
|
+
},
|
342
|
+
{
|
343
|
+
name: "Score",
|
344
|
+
type: "esriFieldTypeDouble",
|
345
|
+
alias: "Score",
|
346
|
+
required: false
|
347
|
+
},
|
348
|
+
{
|
349
|
+
name: "Match_addr",
|
350
|
+
type: "esriFieldTypeString",
|
351
|
+
alias: "Match_addr",
|
352
|
+
required: false,
|
353
|
+
length: 200
|
354
|
+
},
|
355
|
+
{
|
356
|
+
name: "Side",
|
357
|
+
type: "esriFieldTypeString",
|
358
|
+
alias: "Side",
|
359
|
+
required: false,
|
360
|
+
length: 1
|
361
|
+
},
|
362
|
+
{
|
363
|
+
name: "StAddr",
|
364
|
+
type: "esriFieldTypeString",
|
365
|
+
alias: "StAddr",
|
366
|
+
required: false,
|
367
|
+
length: 120
|
368
|
+
},
|
369
|
+
{
|
370
|
+
name: "AddNum",
|
371
|
+
type: "esriFieldTypeString",
|
372
|
+
alias: "AddNum",
|
373
|
+
required: false,
|
374
|
+
length: 12
|
375
|
+
},
|
376
|
+
{
|
377
|
+
name: "StPreDir",
|
378
|
+
type: "esriFieldTypeString",
|
379
|
+
alias: "StPreDir",
|
380
|
+
required: false,
|
381
|
+
length: 20
|
382
|
+
},
|
383
|
+
{
|
384
|
+
name: "StPreType",
|
385
|
+
type: "esriFieldTypeString",
|
386
|
+
alias: "StPreType",
|
387
|
+
required: false,
|
388
|
+
length: 20
|
389
|
+
},
|
390
|
+
{
|
391
|
+
name: "StName",
|
392
|
+
type: "esriFieldTypeString",
|
393
|
+
alias: "StName",
|
394
|
+
required: false,
|
395
|
+
length: 70
|
396
|
+
},
|
397
|
+
{
|
398
|
+
name: "StType",
|
399
|
+
type: "esriFieldTypeString",
|
400
|
+
alias: "StType",
|
401
|
+
required: false,
|
402
|
+
length: 20
|
403
|
+
},
|
404
|
+
{
|
405
|
+
name: "StDir",
|
406
|
+
type: "esriFieldTypeString",
|
407
|
+
alias: "StDir",
|
408
|
+
required: false,
|
409
|
+
length: 20
|
410
|
+
},
|
411
|
+
{
|
412
|
+
name: "City",
|
413
|
+
type: "esriFieldTypeString",
|
414
|
+
alias: "City",
|
415
|
+
required: false,
|
416
|
+
length: 120
|
417
|
+
},
|
418
|
+
{
|
419
|
+
name: "Region",
|
420
|
+
type: "esriFieldTypeString",
|
421
|
+
alias: "Region",
|
422
|
+
required: false,
|
423
|
+
length: 120
|
424
|
+
},
|
425
|
+
{
|
426
|
+
name: "Postal",
|
427
|
+
type: "esriFieldTypeString",
|
428
|
+
alias: "Postal",
|
429
|
+
required: false,
|
430
|
+
length: 10
|
431
|
+
},
|
432
|
+
{
|
433
|
+
name: "Country",
|
434
|
+
type: "esriFieldTypeString",
|
435
|
+
alias: "Country",
|
436
|
+
required: false,
|
437
|
+
length: 10
|
438
|
+
}
|
439
|
+
],
|
440
|
+
intersectionCandidateFields: [
|
441
|
+
{
|
442
|
+
name: "Loc_name",
|
443
|
+
type: "esriFieldTypeString",
|
444
|
+
alias: "Loc_name",
|
445
|
+
required: false,
|
446
|
+
length: 29
|
447
|
+
},
|
448
|
+
{
|
449
|
+
name: "Shape",
|
450
|
+
type: "esriFieldTypeGeometry",
|
451
|
+
alias: "Shape",
|
452
|
+
required: false
|
453
|
+
},
|
454
|
+
{
|
455
|
+
name: "Score",
|
456
|
+
type: "esriFieldTypeDouble",
|
457
|
+
alias: "Score",
|
458
|
+
required: false
|
459
|
+
},
|
460
|
+
{
|
461
|
+
name: "Match_addr",
|
462
|
+
type: "esriFieldTypeString",
|
463
|
+
alias: "Match_addr",
|
464
|
+
required: false,
|
465
|
+
length: 200
|
466
|
+
},
|
467
|
+
{
|
468
|
+
name: "Side",
|
469
|
+
type: "esriFieldTypeString",
|
470
|
+
alias: "Side",
|
471
|
+
required: false,
|
472
|
+
length: 1
|
473
|
+
},
|
474
|
+
{
|
475
|
+
name: "StAddr",
|
476
|
+
type: "esriFieldTypeString",
|
477
|
+
alias: "StAddr",
|
478
|
+
required: false,
|
479
|
+
length: 120
|
480
|
+
},
|
481
|
+
{
|
482
|
+
name: "AddNum",
|
483
|
+
type: "esriFieldTypeString",
|
484
|
+
alias: "AddNum",
|
485
|
+
required: false,
|
486
|
+
length: 12
|
487
|
+
},
|
488
|
+
{
|
489
|
+
name: "StPreDir",
|
490
|
+
type: "esriFieldTypeString",
|
491
|
+
alias: "StPreDir",
|
492
|
+
required: false,
|
493
|
+
length: 20
|
494
|
+
},
|
495
|
+
{
|
496
|
+
name: "StPreType",
|
497
|
+
type: "esriFieldTypeString",
|
498
|
+
alias: "StPreType",
|
499
|
+
required: false,
|
500
|
+
length: 20
|
501
|
+
},
|
502
|
+
{
|
503
|
+
name: "StName",
|
504
|
+
type: "esriFieldTypeString",
|
505
|
+
alias: "StName",
|
506
|
+
required: false,
|
507
|
+
length: 70
|
508
|
+
},
|
509
|
+
{
|
510
|
+
name: "StType",
|
511
|
+
type: "esriFieldTypeString",
|
512
|
+
alias: "StType",
|
513
|
+
required: false,
|
514
|
+
length: 20
|
515
|
+
},
|
516
|
+
{
|
517
|
+
name: "StDir",
|
518
|
+
type: "esriFieldTypeString",
|
519
|
+
alias: "StDir",
|
520
|
+
required: false,
|
521
|
+
length: 20
|
522
|
+
},
|
523
|
+
{
|
524
|
+
name: "City",
|
525
|
+
type: "esriFieldTypeString",
|
526
|
+
alias: "City",
|
527
|
+
required: false,
|
528
|
+
length: 120
|
529
|
+
},
|
530
|
+
{
|
531
|
+
name: "Region",
|
532
|
+
type: "esriFieldTypeString",
|
533
|
+
alias: "Region",
|
534
|
+
required: false,
|
535
|
+
length: 120
|
536
|
+
},
|
537
|
+
{
|
538
|
+
name: "Postal",
|
539
|
+
type: "esriFieldTypeString",
|
540
|
+
alias: "Postal",
|
541
|
+
required: false,
|
542
|
+
length: 10
|
543
|
+
},
|
544
|
+
{
|
545
|
+
name: "Country",
|
546
|
+
type: "esriFieldTypeString",
|
547
|
+
alias: "Country",
|
548
|
+
required: false,
|
549
|
+
length: 10
|
550
|
+
}
|
551
|
+
],
|
552
|
+
spatialReference: {
|
553
|
+
wkid: 4326,
|
554
|
+
latestWkid: 4326
|
555
|
+
},
|
556
|
+
locatorProperties: {
|
557
|
+
UICLSID: "{3D486637-6BCF-4A0C-83DB-A02D437FB8FC}",
|
558
|
+
IntersectionConnectors: "& @ | and",
|
559
|
+
SuggestedBatchSize: 150,
|
560
|
+
MaxBatchSize: 1000,
|
561
|
+
LoadBalancerTimeOut: 60,
|
562
|
+
WriteXYCoordFields: "TRUE",
|
563
|
+
WriteStandardizedAddressField: "FALSE",
|
564
|
+
WriteReferenceIDField: "FALSE",
|
565
|
+
WritePercentAlongField: "FALSE"
|
566
|
+
},
|
567
|
+
locators: [
|
568
|
+
{
|
569
|
+
name: "PointAddress"
|
570
|
+
},
|
571
|
+
{
|
572
|
+
name: "StreetAddress"
|
573
|
+
},
|
574
|
+
{
|
575
|
+
name: "PostalExt"
|
576
|
+
},
|
577
|
+
{
|
578
|
+
name: "StreetName"
|
579
|
+
},
|
580
|
+
{
|
581
|
+
name: "Postal"
|
582
|
+
},
|
583
|
+
{
|
584
|
+
name: "Gazetteer"
|
585
|
+
},
|
586
|
+
{
|
587
|
+
name: "AdminPlaces"
|
588
|
+
}
|
589
|
+
],
|
590
|
+
capabilities: "Geocode,ReverseGeocode,Suggest"
|
591
|
+
};
|