@esri/arcgis-rest-elevation 1.0.1-alpha.1 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/elevation.esm.js +3 -3
- package/dist/bundled/elevation.esm.js.map +1 -1
- package/dist/bundled/elevation.esm.min.js +4 -4
- package/dist/bundled/elevation.esm.min.js.map +1 -1
- package/dist/bundled/elevation.umd.js +80 -82
- package/dist/bundled/elevation.umd.js.map +1 -1
- package/dist/bundled/elevation.umd.min.js +4 -4
- package/dist/bundled/elevation.umd.min.js.map +1 -1
- package/dist/cjs/findElevationAtManyPoints.js +1 -2
- package/dist/cjs/findElevationAtManyPoints.js.map +1 -1
- package/dist/cjs/findElevationAtPoint.js +1 -2
- package/dist/cjs/findElevationAtPoint.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/findElevationAtManyPoints.d.ts +2 -2
- package/dist/esm/findElevationAtPoint.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @preserve
|
|
2
|
-
* @esri/arcgis-rest-elevation -
|
|
3
|
-
* Copyright (c) 2017-
|
|
4
|
-
*
|
|
2
|
+
* @esri/arcgis-rest-elevation - v4.9.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2026 Esri, Inc.
|
|
4
|
+
* Thu Feb 19 2026 01:08:38 GMT+0000 (Coordinated Universal Time)
|
|
5
5
|
*/
|
|
6
6
|
import { appendCustomParams, request } from '@esri/arcgis-rest-request';
|
|
7
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elevation.esm.js","sources":["../../src/utils.ts","../../src/findElevationAtPoint.ts","../../src/findElevationAtManyPoints.ts"],"sourcesContent":["export const baseUrl =\n \"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1\";\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n"],"names":[],"mappings":";;;;;;;AAAO,MAAM,OAAO,GAClB,4EAA4E;;AC+B9E
|
|
1
|
+
{"version":3,"file":"elevation.esm.js","sources":["../../src/utils.ts","../../src/findElevationAtPoint.ts","../../src/findElevationAtManyPoints.ts"],"sourcesContent":["export const baseUrl =\n \"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1\";\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n"],"names":[],"mappings":";;;;;;;AAAO,MAAM,OAAO,GAClB,4EAA4E;;AC+B9E;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,oBAAoB,CAClC,cAA4C,EAAA;AAE5C,IAAA,MAAM,OAAO,GAAG,kBAAkB,CAChC,cAAc,EACd,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAEvB,cAAc,EAEpB;AAED,IAAA,OACE,OAAO,CAAC,CAAA,EAAG,OAAO,CAAA,mBAAA,CAAqB,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAClC,OAAO,CAAA,EAAA,EACV,UAAU,EAAE,KAAK,IAEpB,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAI;AAClB,QAAA,MAAM,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACF,QAAQ,CACZ;AAED,QAAA,OAAO,CAAC;AACV,IAAA,CAAC,CAAC;AACJ;;AC/CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;AACG,SAAU,yBAAyB,CACvC,cAAiD,EAAA;AAEjD,IAAA,MAAM,OAAO,GAAQ,kBAAkB,CACrC,cAAc,EACd,CAAC,YAAY,CAAC,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAET,cAAc,CAAA,CAEpB;AAED,IAAA,OAAO,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC;AAEvE,IAAA,OACE,OAAO,CAAC,CAAA,EAAG,OAAO,2BAA2B,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACxC,OAAO,CAAA,CAEb,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAI;AAClB,QAAA,MAAM,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACF,QAAQ,CACZ;AAED,QAAA,OAAO,CAAC;AACV,IAAA,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @preserve
|
|
2
|
-
* @esri/arcgis-rest-elevation -
|
|
3
|
-
* Copyright (c) 2017-
|
|
4
|
-
*
|
|
2
|
+
* @esri/arcgis-rest-elevation - v4.9.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2026 Esri, Inc.
|
|
4
|
+
* Thu Feb 19 2026 01:08:38 GMT+0000 (Coordinated Universal Time)
|
|
5
5
|
*/
|
|
6
|
-
import{appendCustomParams as t,request as e}from"@esri/arcgis-rest-request";const s="https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1";function i(i){const n=t(i,["lon","lat","relativeTo"],Object.assign({},i));return e(`${s}/elevation/at-point`,Object.assign(Object.assign({},n),{httpMethod:"GET"})).then(
|
|
6
|
+
import{appendCustomParams as t,request as e}from"@esri/arcgis-rest-request";const s="https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1";function i(i){const n=t(i,["lon","lat","relativeTo"],Object.assign({},i));return e(`${s}/elevation/at-point`,Object.assign(Object.assign({},n),{httpMethod:"GET"})).then(t=>Object.assign({},t))}function n(i){const n=t(i,["relativeTo"],Object.assign({},i));return n.params.coordinates=JSON.stringify(i.coordinates),e(`${s}/elevation/at-many-points`,Object.assign({},n)).then(t=>Object.assign({},t))}export{n as findElevationAtManyPoints,i as findElevationAtPoint};
|
|
7
7
|
//# sourceMappingURL=elevation.esm.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elevation.esm.min.js","sources":["../../src/utils.ts","../../src/findElevationAtPoint.ts","../../src/findElevationAtManyPoints.ts"],"sourcesContent":["export const baseUrl =\n \"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1\";\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n"],"names":["baseUrl","findElevationAtPoint","requestOptions","options","appendCustomParams","request","httpMethod","then","response","findElevationAtManyPoints","params","coordinates","JSON","stringify"],"mappings":";;;;;4EAAO,MAAMA,EACX,
|
|
1
|
+
{"version":3,"file":"elevation.esm.min.js","sources":["../../src/utils.ts","../../src/findElevationAtPoint.ts","../../src/findElevationAtManyPoints.ts"],"sourcesContent":["export const baseUrl =\n \"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1\";\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n"],"names":["baseUrl","findElevationAtPoint","requestOptions","options","appendCustomParams","Object","assign","request","httpMethod","then","response","findElevationAtManyPoints","params","coordinates","JSON","stringify"],"mappings":";;;;;4EAAO,MAAMA,EACX,6ECuDI,SAAUC,EACdC,GAEA,MAAMC,EAAUC,EACdF,EACA,CAAC,MAAO,MAAO,cAAaG,OAAAC,OAAA,CAAA,EAEvBJ,IAIP,OACEK,EAAQ,GAAGP,uBAA4BK,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAClCH,GAAO,CACVK,WAAY,SAEdC,KAAMC,GACCL,OAAAC,OAAA,CAAA,EACFI,GAKT,CCfM,SAAUC,EACdT,GAEA,MAAMC,EAAeC,EACnBF,EACA,CAAC,cAAaG,OAAAC,OAAA,GAETJ,IAMP,OAFAC,EAAQS,OAAOC,YAAcC,KAAKC,UAAUb,EAAeW,aAGzDN,EAAQ,GAAGP,6BAAkCK,OAAAC,OAAA,CAAA,EACxCH,IAELM,KAAMC,GACCL,OAAAC,OAAA,CAAA,EACFI,GAKT"}
|
|
@@ -1,93 +1,91 @@
|
|
|
1
1
|
/* @preserve
|
|
2
|
-
* @esri/arcgis-rest-elevation -
|
|
3
|
-
* Copyright (c) 2017-
|
|
4
|
-
*
|
|
2
|
+
* @esri/arcgis-rest-elevation - v4.9.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2026 Esri, Inc.
|
|
4
|
+
* Thu Feb 19 2026 01:08:38 GMT+0000 (Coordinated Universal Time)
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@esri/arcgis-rest-request')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['exports', '@esri/arcgis-rest-request'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.arcgisRest = global.arcgisRest || {}, global.arcgisRest));
|
|
10
10
|
})(this, (function (exports, arcgisRestRequest) { 'use strict';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const baseUrl = "https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1";
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
14
|
+
/**
|
|
15
|
+
* This method returns the elevation in meters at a given longitude and latitude
|
|
16
|
+
* within the WGS84 coordinate system. By default the elevation is measured with
|
|
17
|
+
* respect to the Earth's mean sea level. It takes into account the local
|
|
18
|
+
* variations in gravity and provides a consistent vertical reference.
|
|
19
|
+
*
|
|
20
|
+
* If the relativeTo query parameter is set to `ellipsoid`, the elevation will be
|
|
21
|
+
* measured with respect to the ellipsoid. This is a mathematical model that
|
|
22
|
+
* approximates the shape of the Earth. It does not consider local variations
|
|
23
|
+
* in gravity and is commonly used in GPS positioning.
|
|
24
|
+
*
|
|
25
|
+
* ```
|
|
26
|
+
* import { findElevationAtPoint } from "@esri/arcgis-rest-elevation";
|
|
27
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
28
|
+
*
|
|
29
|
+
* const results = await findElevationAtPoint({
|
|
30
|
+
* lon: -179.99,
|
|
31
|
+
* lat: -85.05,
|
|
32
|
+
* authentication: ApiKeyManager.fromKey("YOUR_ACCESS_TOKEN");
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* console.log(results)
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
function findElevationAtPoint(requestOptions) {
|
|
39
|
+
const options = arcgisRestRequest.appendCustomParams(requestOptions, ["lon", "lat", "relativeTo"], Object.assign({}, requestOptions));
|
|
40
|
+
return arcgisRestRequest.request(`${baseUrl}/elevation/at-point`, Object.assign(Object.assign({}, options), { httpMethod: "GET" })).then((response) => {
|
|
41
|
+
const r = Object.assign({}, response);
|
|
42
|
+
return r;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
46
|
+
/**
|
|
47
|
+
* This method returns elevations in meters at given longitudes and latitudes
|
|
48
|
+
* within the WGS84 coordinate system. The order of the points returned by this
|
|
49
|
+
* request will be the same as the order of the points passed in the coordinates
|
|
50
|
+
* parameter.
|
|
51
|
+
*
|
|
52
|
+
* If the distance between the furthest West and furthest East coordinate or
|
|
53
|
+
* the furthest North and furthest South coordinate exceeds 50km, the service
|
|
54
|
+
* will return a 400 HTTP response as the distance between these points is too
|
|
55
|
+
* large.
|
|
56
|
+
*
|
|
57
|
+
* By default the elevation is measured with respect to the Earth's mean sea level.
|
|
58
|
+
* It takes into account the local variations in gravity and provides a consistent
|
|
59
|
+
* vertical reference.
|
|
60
|
+
*
|
|
61
|
+
* If the relativeTo query parameter is set to `ellipsoid`, the elevation will be
|
|
62
|
+
* measured with respect to the ellipsoid. This is a mathematical model that
|
|
63
|
+
* approximates the shape of the Earth. It does not consider local variations
|
|
64
|
+
* in gravity and is commonly used in GPS positioning.
|
|
65
|
+
*
|
|
66
|
+
* ```
|
|
67
|
+
* import { findElevationAtManyPoints } from "@esri/arcgis-rest-elevation";
|
|
68
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
69
|
+
*
|
|
70
|
+
* const results = await findElevationAtManyPoints({
|
|
71
|
+
* coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],
|
|
72
|
+
* authentication: ApiKeyManager.fromKey("YOUR_ACCESS_TOKEN");
|
|
73
|
+
* });
|
|
74
|
+
*
|
|
75
|
+
* console.log(results)
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
function findElevationAtManyPoints(requestOptions) {
|
|
79
|
+
const options = arcgisRestRequest.appendCustomParams(requestOptions, ["relativeTo"], Object.assign({}, requestOptions));
|
|
80
|
+
options.params.coordinates = JSON.stringify(requestOptions.coordinates);
|
|
81
|
+
return arcgisRestRequest.request(`${baseUrl}/elevation/at-many-points`, Object.assign({}, options)).then((response) => {
|
|
82
|
+
const r = Object.assign({}, response);
|
|
83
|
+
return r;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
87
|
+
exports.findElevationAtManyPoints = findElevationAtManyPoints;
|
|
88
|
+
exports.findElevationAtPoint = findElevationAtPoint;
|
|
91
89
|
|
|
92
90
|
}));
|
|
93
91
|
//# sourceMappingURL=elevation.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elevation.umd.js","sources":["../../src/utils.ts","../../src/findElevationAtPoint.ts","../../src/findElevationAtManyPoints.ts"],"sourcesContent":["export const baseUrl =\n \"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1\";\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n"],"names":["appendCustomParams","request"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"elevation.umd.js","sources":["../../src/utils.ts","../../src/findElevationAtPoint.ts","../../src/findElevationAtManyPoints.ts"],"sourcesContent":["export const baseUrl =\n \"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1\";\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n"],"names":["appendCustomParams","request"],"mappings":";;;;;;;;;;;IAAO,MAAM,OAAO,GAClB,4EAA4E;;IC+B9E;;;;;;;;;;;;;;;;;;;;;;;IAuBG;IACG,SAAU,oBAAoB,CAClC,cAA4C,EAAA;IAE5C,IAAA,MAAM,OAAO,GAAGA,oCAAkB,CAChC,cAAc,EACd,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAEvB,cAAc,EAEpB;IAED,IAAA,OACEC,yBAAO,CAAC,CAAA,EAAG,OAAO,CAAA,mBAAA,CAAqB,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAClC,OAAO,CAAA,EAAA,EACV,UAAU,EAAE,KAAK,IAEpB,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAI;IAClB,QAAA,MAAM,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACF,QAAQ,CACZ;IAED,QAAA,OAAO,CAAC;IACV,IAAA,CAAC,CAAC;IACJ;;IC/CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+BG;IACG,SAAU,yBAAyB,CACvC,cAAiD,EAAA;IAEjD,IAAA,MAAM,OAAO,GAAQD,oCAAkB,CACrC,cAAc,EACd,CAAC,YAAY,CAAC,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAET,cAAc,CAAA,CAEpB;IAED,IAAA,OAAO,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC;IAEvE,IAAA,OACEC,yBAAO,CAAC,CAAA,EAAG,OAAO,2BAA2B,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACxC,OAAO,CAAA,CAEb,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAI;IAClB,QAAA,MAAM,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACF,QAAQ,CACZ;IAED,QAAA,OAAO,CAAC;IACV,IAAA,CAAC,CAAC;IACJ;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @preserve
|
|
2
|
-
* @esri/arcgis-rest-elevation -
|
|
3
|
-
* Copyright (c) 2017-
|
|
4
|
-
*
|
|
2
|
+
* @esri/arcgis-rest-elevation - v4.9.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2026 Esri, Inc.
|
|
4
|
+
* Thu Feb 19 2026 01:08:38 GMT+0000 (Coordinated Universal Time)
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,function(e,t){"use strict";const s="https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1";e.findElevationAtManyPoints=function(e){const i=t.appendCustomParams(e,["relativeTo"],Object.assign({},e));return i.params.coordinates=JSON.stringify(e.coordinates),t.request(`${s}/elevation/at-many-points`,Object.assign({},i)).then(e=>Object.assign({},e))},e.findElevationAtPoint=function(e){const i=t.appendCustomParams(e,["lon","lat","relativeTo"],Object.assign({},e));return t.request(`${s}/elevation/at-point`,Object.assign(Object.assign({},i),{httpMethod:"GET"})).then(e=>Object.assign({},e))}});
|
|
7
7
|
//# sourceMappingURL=elevation.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elevation.umd.min.js","sources":["../../src/utils.ts","../../src/findElevationAtManyPoints.ts","../../src/findElevationAtPoint.ts"],"sourcesContent":["export const baseUrl =\n \"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1\";\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n"],"names":["baseUrl","requestOptions","options","appendCustomParams","params","coordinates","JSON","stringify","request","then","response","httpMethod"],"mappings":"
|
|
1
|
+
{"version":3,"file":"elevation.umd.min.js","sources":["../../src/utils.ts","../../src/findElevationAtManyPoints.ts","../../src/findElevationAtPoint.ts"],"sourcesContent":["export const baseUrl =\n \"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1\";\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n"],"names":["baseUrl","requestOptions","options","appendCustomParams","Object","assign","params","coordinates","JSON","stringify","request","then","response","httpMethod"],"mappings":";;;;;+UAAO,MAAMA,EACX,yGC+DI,SACJC,GAEA,MAAMC,EAAeC,qBACnBF,EACA,CAAC,cAAaG,OAAAC,OAAA,GAETJ,IAMP,OAFAC,EAAQI,OAAOC,YAAcC,KAAKC,UAAUR,EAAeM,aAGzDG,EAAAA,QAAQ,GAAGV,6BAAkCI,OAAAC,OAAA,CAAA,EACxCH,IAELS,KAAMC,GACCR,OAAAC,OAAA,CAAA,EACFO,GAKT,yBChCM,SACJX,GAEA,MAAMC,EAAUC,EAAAA,mBACdF,EACA,CAAC,MAAO,MAAO,cAAaG,OAAAC,OAAA,CAAA,EAEvBJ,IAIP,OACES,EAAAA,QAAQ,GAAGV,uBAA4BI,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAClCH,GAAO,CACVW,WAAY,SAEdF,KAAMC,GACCR,OAAAC,OAAA,CAAA,EACFO,GAKT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findElevationAtManyPoints =
|
|
3
|
+
exports.findElevationAtManyPoints = findElevationAtManyPoints;
|
|
4
4
|
const arcgis_rest_request_1 = require("@esri/arcgis-rest-request");
|
|
5
5
|
const utils_js_1 = require("./utils.js");
|
|
6
6
|
/**
|
|
@@ -43,5 +43,4 @@ function findElevationAtManyPoints(requestOptions) {
|
|
|
43
43
|
return r;
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
exports.findElevationAtManyPoints = findElevationAtManyPoints;
|
|
47
46
|
//# sourceMappingURL=findElevationAtManyPoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findElevationAtManyPoints.js","sourceRoot":"","sources":["../../src/findElevationAtManyPoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"findElevationAtManyPoints.js","sourceRoot":"","sources":["../../src/findElevationAtManyPoints.ts"],"names":[],"mappings":";;AAgEA,8DAwBC;AAxFD,mEAImC;AAGnC,yCAAqC;AAyBrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,yBAAyB,CACvC,cAAiD;IAEjD,MAAM,OAAO,GAAQ,IAAA,wCAAkB,EACrC,cAAc,EACd,CAAC,YAAY,CAAC,oBAET,cAAc,EAEpB,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAExE,OACE,IAAA,6BAAO,EAAC,GAAG,kBAAO,2BAA2B,oBACxC,OAAO,EAEb,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QAClB,MAAM,CAAC,qBACF,QAAQ,CACZ,CAAC;QAEF,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtManyPointsPost\"][\"requestBody\"][\"content\"][\"application/json\"],\n \"coordinates\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtManyPointsPost\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtManyPointsResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtManyPointsOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns elevations in meters at given longitudes and latitudes\n * within the WGS84 coordinate system. The order of the points returned by this\n * request will be the same as the order of the points passed in the coordinates\n * parameter.\n *\n * If the distance between the furthest West and furthest East coordinate or\n * the furthest North and furthest South coordinate exceeds 50km, the service\n * will return a 400 HTTP response as the distance between these points is too\n * large.\n *\n * By default the elevation is measured with respect to the Earth's mean sea level.\n * It takes into account the local variations in gravity and provides a consistent\n * vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtManyPoints } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtManyPoints({\n * coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtManyPoints(\n requestOptions: IFindElevationAtManyPointsOptions\n): Promise<IFindElevationAtManyPointsResponse> {\n const options: any = appendCustomParams<IFindElevationAtManyPointsOptions>(\n requestOptions,\n [\"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n options.params.coordinates = JSON.stringify(requestOptions.coordinates);\n\n return (\n request(`${baseUrl}/elevation/at-many-points`, {\n ...options\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtManyPointsResponse = {\n ...response\n };\n\n return r;\n });\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findElevationAtPoint =
|
|
3
|
+
exports.findElevationAtPoint = findElevationAtPoint;
|
|
4
4
|
const arcgis_rest_request_1 = require("@esri/arcgis-rest-request");
|
|
5
5
|
const utils_js_1 = require("./utils.js");
|
|
6
6
|
/**
|
|
@@ -34,5 +34,4 @@ function findElevationAtPoint(requestOptions) {
|
|
|
34
34
|
return r;
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
exports.findElevationAtPoint = findElevationAtPoint;
|
|
38
37
|
//# sourceMappingURL=findElevationAtPoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findElevationAtPoint.js","sourceRoot":"","sources":["../../src/findElevationAtPoint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"findElevationAtPoint.js","sourceRoot":"","sources":["../../src/findElevationAtPoint.ts"],"names":[],"mappings":";;AAwDA,oDAuBC;AA/ED,mEAImC;AAGnC,yCAAqC;AAyBrC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,oBAAoB,CAClC,cAA4C;IAE5C,MAAM,OAAO,GAAG,IAAA,wCAAkB,EAChC,cAAc,EACd,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,oBAEvB,cAAc,EAEpB,CAAC;IAEF,OACE,IAAA,6BAAO,EAAC,GAAG,kBAAO,qBAAqB,kCAClC,OAAO,KACV,UAAU,EAAE,KAAK,IAEpB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QAClB,MAAM,CAAC,qBACF,QAAQ,CACZ,CAAC;QAEF,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"ElevationAtPointGet\"][\"parameters\"][\"query\"],\n \"lon\" | \"lat\" | \"relativeTo\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"ElevationAtPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findElevationAtPoint};\n */\nexport interface IFindElevationAtPointResponse extends successResponse {}\n\n/**\n * Options for {@linkcode findElevationAtPoint}.\n */\nexport interface IFindElevationAtPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * This method returns the elevation in meters at a given longitude and latitude\n * within the WGS84 coordinate system. By default the elevation is measured with\n * respect to the Earth's mean sea level. It takes into account the local\n * variations in gravity and provides a consistent vertical reference.\n *\n * If the relativeTo query parameter is set to `ellipsoid`, the elevation will be\n * measured with respect to the ellipsoid. This is a mathematical model that\n * approximates the shape of the Earth. It does not consider local variations\n * in gravity and is commonly used in GPS positioning.\n *\n * ```\n * import { findElevationAtPoint } from \"@esri/arcgis-rest-elevation\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findElevationAtPoint({\n * lon: -179.99,\n * lat: -85.05,\n * authentication: ApiKeyManager.fromKey(\"YOUR_ACCESS_TOKEN\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findElevationAtPoint(\n requestOptions: IFindElevationAtPointOptions\n): Promise<IFindElevationAtPointResponse> {\n const options = appendCustomParams<IFindElevationAtPointOptions>(\n requestOptions,\n [\"lon\", \"lat\", \"relativeTo\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/elevation/at-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindElevationAtPointResponse = {\n ...response\n };\n\n return r;\n });\n}\n"]}
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Apache-2.0 */
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
tslib_1.__exportStar(require("./findElevationAtPoint.js"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./findElevationAtManyPoints.js"), exports);
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;gBACgB;;;AAMhB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;gBACgB;;;AAMhB,oEAA0C;AAC1C,yEAA+C","sourcesContent":["/* Copyright (c) 2023 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\n// Types that are used in this package are re-exported for convenience and\n// to make the links work correctly in the documentation pages.\nexport type {} from \"@esri/arcgis-rest-request\";\n\nexport * from \"./findElevationAtPoint.js\";\nexport * from \"./findElevationAtManyPoints.js\";\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { operations } from "./openapi-types.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type queryParams = Pick<operations["ElevationAtManyPointsPost"]["requestBody"]["content"]["application/json"], "coordinates" | "relativeTo">;
|
|
4
|
+
type successResponse = operations["ElevationAtManyPointsPost"]["responses"]["200"]["content"]["application/json"];
|
|
5
5
|
/**
|
|
6
6
|
* The response format for {@linkcode findElevationAtPoint};
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { operations } from "./openapi-types.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type queryParams = Pick<operations["ElevationAtPointGet"]["parameters"]["query"], "lon" | "lat" | "relativeTo">;
|
|
4
|
+
type successResponse = operations["ElevationAtPointGet"]["responses"]["200"]["content"]["application/json"];
|
|
5
5
|
/**
|
|
6
6
|
* The response format for {@linkcode findElevationAtPoint};
|
|
7
7
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/arcgis-rest-elevation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.9.0",
|
|
4
4
|
"description": "Wrapper for the elevation service for @esri/arcgis-rest-js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"tslib": "^2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@esri/arcgis-rest-request": "4.
|
|
49
|
+
"@esri/arcgis-rest-request": "^4.0.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@esri/arcgis-rest-request": "4.
|
|
52
|
+
"@esri/arcgis-rest-request": "^4.9.0"
|
|
53
53
|
},
|
|
54
54
|
"contributors": [
|
|
55
55
|
"Patrick Arlt <parlt@esri.com> (http://patrickarlt.com/)",
|