esri-gl 1.0.5 → 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 +55 -1
- 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 +57 -10
- package/dist/react-map-gl.js +313 -290
- 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 +10 -7
- 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,11 +1,35 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* Common authentication and request options forwarded to the underlying
|
|
14
|
+
* Esri service when any defined value is passed on a layer component.
|
|
15
|
+
*/
|
|
16
|
+
interface EsriAuthProps {
|
|
17
|
+
/** ArcGIS token (sent as the `token` request parameter) */
|
|
18
|
+
token?: string;
|
|
19
|
+
/** ArcGIS Location Platform API key (sent as the `token` parameter) */
|
|
20
|
+
apiKey?: string;
|
|
21
|
+
/** ArcGIS REST JS authentication manager (preferred for OAuth/user sign-in) */
|
|
22
|
+
authentication?: EsriAuthentication;
|
|
23
|
+
/** @deprecated No longer applied. */
|
|
24
|
+
proxy?: string | boolean;
|
|
25
|
+
/** Whether to fetch and apply service attribution (default true in services) */
|
|
26
|
+
getAttributionFromService?: boolean;
|
|
27
|
+
/** Extra request params merged into every service request */
|
|
28
|
+
requestParams?: Record<string, unknown>;
|
|
29
|
+
/** @deprecated No longer forwarded to requests; use `authentication`. */
|
|
30
|
+
fetchOptions?: RequestInit;
|
|
31
|
+
}
|
|
32
|
+
interface EsriLayerBaseProps extends EsriAuthProps {
|
|
9
33
|
id: string;
|
|
10
34
|
sourceId?: string;
|
|
11
35
|
beforeId?: string;
|
|
@@ -33,7 +57,14 @@ interface EsriVectorTileLayerProps extends EsriLayerBaseProps {
|
|
|
33
57
|
}
|
|
34
58
|
interface EsriVectorBasemapLayerProps extends EsriLayerBaseProps {
|
|
35
59
|
basemapEnum: string;
|
|
36
|
-
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;
|
|
37
68
|
}
|
|
38
69
|
interface EsriFeatureLayerProps extends EsriLayerBaseProps {
|
|
39
70
|
url: string;
|
|
@@ -43,6 +74,16 @@ interface EsriFeatureLayerProps extends EsriLayerBaseProps {
|
|
|
43
74
|
paint?: Record<string, unknown>;
|
|
44
75
|
layout?: Record<string, unknown>;
|
|
45
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
|
+
}
|
|
46
87
|
|
|
47
88
|
/**
|
|
48
89
|
* React Map GL component for Esri Dynamic Map Service
|
|
@@ -74,11 +115,17 @@ declare function EsriVectorBasemapLayer(props: EsriVectorBasemapLayerProps): nul
|
|
|
74
115
|
*/
|
|
75
116
|
declare function EsriFeatureLayer(props: EsriFeatureLayerProps): null;
|
|
76
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
|
+
|
|
77
124
|
/**
|
|
78
125
|
* Hook for using Esri services with Mapbox GL JS (via react-map-gl)
|
|
79
126
|
*/
|
|
80
127
|
declare function useEsriMapboxLayer(): {
|
|
81
|
-
map: Map |
|
|
128
|
+
map: maplibre_gl.Map | undefined;
|
|
82
129
|
useDynamicMapService: (options: Parameters<typeof useDynamicMapService>[0]) => UseEsriServiceResult<DynamicMapService>;
|
|
83
130
|
useTiledMapService: (options: Parameters<typeof useTiledMapService>[0]) => UseEsriServiceResult<TiledMapService>;
|
|
84
131
|
useImageService: (options: Parameters<typeof useImageService>[0]) => UseEsriServiceResult<ImageService>;
|
|
@@ -90,7 +137,7 @@ declare function useEsriMapboxLayer(): {
|
|
|
90
137
|
* Hook for using Esri services with MapLibre GL JS (via react-map-gl/maplibre)
|
|
91
138
|
*/
|
|
92
139
|
declare function useEsriMaplibreLayer(): {
|
|
93
|
-
map: Map |
|
|
140
|
+
map: maplibre_gl.Map | undefined;
|
|
94
141
|
useDynamicMapService: (options: Parameters<typeof useDynamicMapService>[0]) => UseEsriServiceResult<DynamicMapService>;
|
|
95
142
|
useTiledMapService: (options: Parameters<typeof useTiledMapService>[0]) => UseEsriServiceResult<TiledMapService>;
|
|
96
143
|
useImageService: (options: Parameters<typeof useImageService>[0]) => UseEsriServiceResult<ImageService>;
|
|
@@ -98,5 +145,5 @@ declare function useEsriMaplibreLayer(): {
|
|
|
98
145
|
useFeatureService: (options: Parameters<typeof useFeatureService>[0]) => UseEsriServiceResult<FeatureService>;
|
|
99
146
|
};
|
|
100
147
|
|
|
101
|
-
export { DynamicMapService, EsriDynamicLayer, EsriFeatureLayer, EsriImageLayer, EsriTiledLayer, EsriVectorBasemapLayer, EsriVectorTileLayer, FeatureService, ImageService, TiledMapService, VectorTileService, useEsriMapboxLayer, useEsriMaplibreLayer };
|
|
102
|
-
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 };
|