esri-gl 1.0.6 → 2.0.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/README.md +52 -2
- package/dist/{index-DczUYC4z.d.ts → index-Doq93o-G.d.ts} +252 -75
- package/dist/{IdentifyImage-DmyKcbAv.js → index-DsY1_0df.js} +825 -678
- package/dist/index-DsY1_0df.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +7181 -1017
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +5 -1
- package/dist/react-map-gl.d.ts +42 -13
- package/dist/react-map-gl.js +292 -304
- package/dist/react-map-gl.js.map +1 -1
- package/dist/react.d.ts +23 -28
- package/dist/react.js +202 -178
- package/dist/react.js.map +1 -1
- package/dist/{useFeatureService-E9PiUOLP.js → useFeatureService-BRY6PHUs.js} +50 -12
- package/dist/useFeatureService-BRY6PHUs.js.map +1 -0
- package/dist/{useFeatureService-QUqwJcet.d.ts → useFeatureService-CG70gjQy.d.ts} +29 -41
- package/package.json +8 -5
- package/dist/IdentifyImage-DmyKcbAv.js.map +0 -1
- package/dist/useFeatureService-E9PiUOLP.js.map +0 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esri-gl",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A module for making it easier to use Esri services in mapbox-gl or maplibre-gl.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -63,6 +63,10 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
+
"@esri/arcgis-rest-basemap-sessions": "^4.10.2",
|
|
67
|
+
"@esri/arcgis-rest-feature-service": "^4.10.2",
|
|
68
|
+
"@esri/arcgis-rest-portal": "^4.10.2",
|
|
69
|
+
"@esri/arcgis-rest-request": "^4.10.2",
|
|
66
70
|
"@mapbox/tilebelt": "^2.0.3",
|
|
67
71
|
"arcgis-pbf-parser": "^0.0.4"
|
|
68
72
|
}
|
package/dist/react-map-gl.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { r as EsriAuthentication, a2 as PortalServiceResult, D as DynamicMapService, T as TiledMapService, g as ImageService, h as VectorTileService, i as FeatureService } from './index-Doq93o-G.js';
|
|
2
|
+
export { l as AGOLServiceError, A as ApplyEditsResult, m as AttachmentInfo, B as BatchLayerOperation, n as BetweenFilter, C as ComparisonFilter, o as ComparisonOp, p as DynamicLayer, a as EditResult, q as EsriAuthOptions, s as EsriDrawingInfo, t as EsriDynamicMapLayerSource, u as EsriRenderer, v as EsriRequestOptions, E as EsriServiceOptions, w as EsriTextSymbol, x as Extent, F as FeatureServiceOptions, y as FeatureSet, z as FieldInfo, G as Find, H as GroupFilter, J as IdentifyFeatures, k as IdentifyImage, c as ImageServiceOptions, K as InFilter, L as LayerFilter, M as LayerInfo, N as LayerLabelingInfo, O as LayerMetadata, Q as LayerQueryOptions, R as LayerScaleRange, S as LayerSpecification, U as LayerTimeOptions, W as LayerUpdateEvent, X as LayerUpdateType, Y as LegendInfo, Z as LogicalOp, _ as MapExportOptions, $ as NullFilter, a0 as PaginatedFeatureCollection, P as PortalItemServiceOptions, a1 as PortalRequestOptions, d as PortalResolvedService, e as PortalServiceKind, a3 as Query, a4 as RasterSourceOptions, a5 as Service, a6 as ServiceErrorEvent, a7 as ServiceEventType, a8 as ServiceMetadata, a9 as SourceSpecification, aa as StatisticResult, ab as Task, ac as TimeAnimationOptions, j as VectorBasemapStyle, V as VectorBasemapStyleOptions, ad as VectorSourceOptions, f as VectorTileServiceOptions, ae as WebMapOptions, af as cleanTrailingSlash, ag as esriRequest, ah as find, ai as getServiceDetails, aj as identifyImage, ak as query, al as resolveAuthentication, am as searchPortalItems, an as serviceFromPortalItem, ao as servicesFromWebMap, ap as updateAttribution } from './index-Doq93o-G.js';
|
|
3
|
+
import * as maplibre_gl from 'maplibre-gl';
|
|
3
4
|
export { Map } from 'maplibre-gl';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
5
|
+
import { u as useDynamicMapService, U as UseEsriServiceResult, r as useTiledMapService, q as useImageService, s as useVectorTileService, p as useFeatureService } from './useFeatureService-CG70gjQy.js';
|
|
6
|
+
export { ApiKeyManager, ApplicationCredentialsManager, ArcGISAuthError, ArcGISIdentityManager, ArcGISRequestError, FieldType, GeometryType, IAuthenticationManager, ICodedValue, IDomain, IExtent, IFeature, IFeatureSet, IField, IGeometry, IHasZM, IMultipoint, IPoint, IPolygon, IPolyline, IRequestOptions, ISpatialReference, Units } from '@esri/arcgis-rest-request';
|
|
7
|
+
export { IAddAttachmentOptions, IAddFeaturesOptions, IAllLayersAndTablesResponse, IApplyEditsOptions, IApplyEditsResult, IAttachmentInfo, IDecodeValuesOptions, IDeleteAttachmentsOptions, IDeleteFeaturesOptions, IEditFeatureResult, IFeatureServiceDefinition, IGetAttachmentsOptions, IGetFeatureOptions, IGetLayerOptions, ILayer, ILayerDefinition, IOrderByField, IQueryAllFeaturesOptions, IQueryAllFeaturesResponse, IQueryFeaturesOptions, IQueryFeaturesResponse, IQueryRelatedOptions, IQueryRelatedResponse, IQueryResponse, IRelatedRecordGroup, IRelatedRecordsInfo, ISharedEditOptions, ISharedQueryOptions, IStatisticDefinition } from '@esri/arcgis-rest-feature-service';
|
|
8
|
+
export { BasemapStyleSession, IStartSessionParams, StyleFamily } from '@esri/arcgis-rest-basemap-sessions';
|
|
9
|
+
export { IGroup, IItem, IPagingParams, ISearchOptions, ISearchResult, IUser, SearchQueryBuilder } from '@esri/arcgis-rest-portal';
|
|
6
10
|
import 'react';
|
|
7
11
|
|
|
8
12
|
/**
|
|
@@ -10,17 +14,19 @@ import 'react';
|
|
|
10
14
|
* Esri service when any defined value is passed on a layer component.
|
|
11
15
|
*/
|
|
12
16
|
interface EsriAuthProps {
|
|
13
|
-
/** ArcGIS token sent
|
|
17
|
+
/** ArcGIS token (sent as the `token` request parameter) */
|
|
14
18
|
token?: string;
|
|
15
|
-
/** ArcGIS API key sent
|
|
19
|
+
/** ArcGIS Location Platform API key (sent as the `token` parameter) */
|
|
16
20
|
apiKey?: string;
|
|
17
|
-
/**
|
|
21
|
+
/** ArcGIS REST JS authentication manager (preferred for OAuth/user sign-in) */
|
|
22
|
+
authentication?: EsriAuthentication;
|
|
23
|
+
/** @deprecated No longer applied. */
|
|
18
24
|
proxy?: string | boolean;
|
|
19
25
|
/** Whether to fetch and apply service attribution (default true in services) */
|
|
20
26
|
getAttributionFromService?: boolean;
|
|
21
27
|
/** Extra request params merged into every service request */
|
|
22
28
|
requestParams?: Record<string, unknown>;
|
|
23
|
-
/**
|
|
29
|
+
/** @deprecated No longer forwarded to requests; use `authentication`. */
|
|
24
30
|
fetchOptions?: RequestInit;
|
|
25
31
|
}
|
|
26
32
|
interface EsriLayerBaseProps extends EsriAuthProps {
|
|
@@ -51,7 +57,14 @@ interface EsriVectorTileLayerProps extends EsriLayerBaseProps {
|
|
|
51
57
|
}
|
|
52
58
|
interface EsriVectorBasemapLayerProps extends EsriLayerBaseProps {
|
|
53
59
|
basemapEnum: string;
|
|
54
|
-
token
|
|
60
|
+
/** OAuth / user token (v2 host). Provide `token` or `apiKey`. */
|
|
61
|
+
token?: string;
|
|
62
|
+
/** ArcGIS Location Platform API key (v1 host). Provide `token` or `apiKey`. */
|
|
63
|
+
apiKey?: string;
|
|
64
|
+
/** Optional locale for the basemap labels. */
|
|
65
|
+
language?: string;
|
|
66
|
+
/** Optional worldview. */
|
|
67
|
+
worldview?: string;
|
|
55
68
|
}
|
|
56
69
|
interface EsriFeatureLayerProps extends EsriLayerBaseProps {
|
|
57
70
|
url: string;
|
|
@@ -61,6 +74,16 @@ interface EsriFeatureLayerProps extends EsriLayerBaseProps {
|
|
|
61
74
|
paint?: Record<string, unknown>;
|
|
62
75
|
layout?: Record<string, unknown>;
|
|
63
76
|
}
|
|
77
|
+
interface EsriPortalLayerProps extends EsriLayerBaseProps {
|
|
78
|
+
/** ArcGIS portal item id to resolve to a service. */
|
|
79
|
+
itemId: string;
|
|
80
|
+
/** For multi-layer Feature Services, which sublayer to load (default 0). */
|
|
81
|
+
layerId?: number;
|
|
82
|
+
/** Portal sharing REST URL (defaults to ArcGIS Online). */
|
|
83
|
+
portal?: string;
|
|
84
|
+
/** Called once the item resolves, with the resolved service/kind/url/title. */
|
|
85
|
+
onResolve?: (result: PortalServiceResult) => void;
|
|
86
|
+
}
|
|
64
87
|
|
|
65
88
|
/**
|
|
66
89
|
* React Map GL component for Esri Dynamic Map Service
|
|
@@ -92,11 +115,17 @@ declare function EsriVectorBasemapLayer(props: EsriVectorBasemapLayerProps): nul
|
|
|
92
115
|
*/
|
|
93
116
|
declare function EsriFeatureLayer(props: EsriFeatureLayerProps): null;
|
|
94
117
|
|
|
118
|
+
/**
|
|
119
|
+
* React Map GL component that resolves an ArcGIS portal item id to the matching
|
|
120
|
+
* esri-gl service and adds a renderer-appropriate layer for it.
|
|
121
|
+
*/
|
|
122
|
+
declare function EsriPortalLayer(props: EsriPortalLayerProps): null;
|
|
123
|
+
|
|
95
124
|
/**
|
|
96
125
|
* Hook for using Esri services with Mapbox GL JS (via react-map-gl)
|
|
97
126
|
*/
|
|
98
127
|
declare function useEsriMapboxLayer(): {
|
|
99
|
-
map: Map |
|
|
128
|
+
map: maplibre_gl.Map | undefined;
|
|
100
129
|
useDynamicMapService: (options: Parameters<typeof useDynamicMapService>[0]) => UseEsriServiceResult<DynamicMapService>;
|
|
101
130
|
useTiledMapService: (options: Parameters<typeof useTiledMapService>[0]) => UseEsriServiceResult<TiledMapService>;
|
|
102
131
|
useImageService: (options: Parameters<typeof useImageService>[0]) => UseEsriServiceResult<ImageService>;
|
|
@@ -108,7 +137,7 @@ declare function useEsriMapboxLayer(): {
|
|
|
108
137
|
* Hook for using Esri services with MapLibre GL JS (via react-map-gl/maplibre)
|
|
109
138
|
*/
|
|
110
139
|
declare function useEsriMaplibreLayer(): {
|
|
111
|
-
map: Map |
|
|
140
|
+
map: maplibre_gl.Map | undefined;
|
|
112
141
|
useDynamicMapService: (options: Parameters<typeof useDynamicMapService>[0]) => UseEsriServiceResult<DynamicMapService>;
|
|
113
142
|
useTiledMapService: (options: Parameters<typeof useTiledMapService>[0]) => UseEsriServiceResult<TiledMapService>;
|
|
114
143
|
useImageService: (options: Parameters<typeof useImageService>[0]) => UseEsriServiceResult<ImageService>;
|
|
@@ -116,5 +145,5 @@ declare function useEsriMaplibreLayer(): {
|
|
|
116
145
|
useFeatureService: (options: Parameters<typeof useFeatureService>[0]) => UseEsriServiceResult<FeatureService>;
|
|
117
146
|
};
|
|
118
147
|
|
|
119
|
-
export { DynamicMapService, EsriDynamicLayer, EsriFeatureLayer, EsriImageLayer, EsriTiledLayer, EsriVectorBasemapLayer, EsriVectorTileLayer, FeatureService, ImageService, TiledMapService, VectorTileService, useEsriMapboxLayer, useEsriMaplibreLayer };
|
|
120
|
-
export type { EsriDynamicLayerProps as ReactMapGLEsriDynamicLayerProps, EsriFeatureLayerProps as ReactMapGLEsriFeatureLayerProps, EsriImageLayerProps as ReactMapGLEsriImageLayerProps, EsriTiledLayerProps as ReactMapGLEsriTiledLayerProps, EsriVectorBasemapLayerProps as ReactMapGLEsriVectorBasemapLayerProps, EsriVectorTileLayerProps as ReactMapGLEsriVectorTileLayerProps };
|
|
148
|
+
export { DynamicMapService, EsriAuthentication, EsriDynamicLayer, EsriFeatureLayer, EsriImageLayer, EsriPortalLayer, EsriTiledLayer, EsriVectorBasemapLayer, EsriVectorTileLayer, FeatureService, ImageService, PortalServiceResult, TiledMapService, VectorTileService, useEsriMapboxLayer, useEsriMaplibreLayer };
|
|
149
|
+
export type { EsriDynamicLayerProps as ReactMapGLEsriDynamicLayerProps, EsriFeatureLayerProps as ReactMapGLEsriFeatureLayerProps, EsriImageLayerProps as ReactMapGLEsriImageLayerProps, EsriPortalLayerProps as ReactMapGLEsriPortalLayerProps, EsriTiledLayerProps as ReactMapGLEsriTiledLayerProps, EsriVectorBasemapLayerProps as ReactMapGLEsriVectorBasemapLayerProps, EsriVectorTileLayerProps as ReactMapGLEsriVectorTileLayerProps };
|