esri-gl 1.0.5 → 1.0.6

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 CHANGED
@@ -6,6 +6,7 @@ A TypeScript library that bridges Esri ArcGIS REST services with MapLibre GL JS
6
6
  [![CI](https://github.com/muimsd/esri-gl/actions/workflows/ci.yml/badge.svg)](https://github.com/muimsd/esri-gl/actions/workflows/ci.yml)
7
7
  [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+
9
10
  **[Documentation](https://esri-gl.pages.dev/)** · **[Live Demos](https://esri-gl-demo.pages.dev/)** · **[npm](https://www.npmjs.com/package/esri-gl)**
10
11
 
11
12
  ## Features
@@ -160,6 +161,7 @@ import { EsriDynamicLayer, EsriFeatureLayer } from 'esri-gl/react-map-gl';
160
161
  url="https://.../Census/MapServer"
161
162
  layers={[0, 1]}
162
163
  opacity={0.8}
164
+ token="YOUR_TOKEN"
163
165
  />
164
166
  <EsriFeatureLayer
165
167
  id="states"
@@ -169,6 +171,8 @@ import { EsriDynamicLayer, EsriFeatureLayer } from 'esri-gl/react-map-gl';
169
171
  </Map>
170
172
  ```
171
173
 
174
+ All layer components accept `token`, `apiKey`, `proxy`, `getAttributionFromService`, `requestParams`, and `fetchOptions` for authenticated services and custom request behavior.
175
+
172
176
  ## Examples
173
177
 
174
178
  Working examples in [`examples/`](examples/):
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esri-gl",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
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",
@@ -5,7 +5,25 @@ import { D as DynamicMapService, T as TiledMapService, e as ImageService, f as V
5
5
  export { j as AGOLServiceError, A as ApplyEditsResult, k as AttachmentInfo, B as BatchLayerOperation, l as BetweenFilter, C as ComparisonFilter, m as ComparisonOp, n as DynamicLayer, a as EditResult, o as EsriDrawingInfo, p as EsriDynamicMapLayerSource, q as EsriRenderer, E as EsriServiceOptions, r as EsriTextSymbol, s as Extent, F as FeatureServiceOptions, t as FeatureSet, u as FieldInfo, v as Find, G as GroupFilter, w as IdentifyFeatures, i as IdentifyImage, c as ImageServiceOptions, x as InFilter, L as LayerFilter, y as LayerInfo, z as LayerLabelingInfo, H as LayerMetadata, J as LayerQueryOptions, K as LayerScaleRange, M as LayerSpecification, N as LayerTimeOptions, O as LayerUpdateEvent, P as LayerUpdateType, Q as LegendInfo, R as LogicalOp, S as MapExportOptions, U as NullFilter, W as PaginatedFeatureCollection, X as Query, Y as RasterSourceOptions, Z as Service, _ as ServiceErrorEvent, $ as ServiceEventType, a0 as ServiceMetadata, a1 as SourceSpecification, a2 as StatisticResult, a3 as Task, a4 as TimeAnimationOptions, h as VectorBasemapStyle, V as VectorBasemapStyleOptions, a5 as VectorSourceOptions, d as VectorTileServiceOptions, a6 as cleanTrailingSlash, a7 as find, a8 as getServiceDetails, a9 as identifyImage, aa as query, ab as updateAttribution } from './index-DczUYC4z.js';
6
6
  import 'react';
7
7
 
8
- interface EsriLayerBaseProps {
8
+ /**
9
+ * Common authentication and request options forwarded to the underlying
10
+ * Esri service when any defined value is passed on a layer component.
11
+ */
12
+ interface EsriAuthProps {
13
+ /** ArcGIS token sent with every request as `token` query param */
14
+ token?: string;
15
+ /** ArcGIS API key sent via `X-Esri-Authorization` header */
16
+ apiKey?: string;
17
+ /** Proxy URL or flag forwarded to the service */
18
+ proxy?: string | boolean;
19
+ /** Whether to fetch and apply service attribution (default true in services) */
20
+ getAttributionFromService?: boolean;
21
+ /** Extra request params merged into every service request */
22
+ requestParams?: Record<string, unknown>;
23
+ /** Extra fetch options used by the service */
24
+ fetchOptions?: RequestInit;
25
+ }
26
+ interface EsriLayerBaseProps extends EsriAuthProps {
9
27
  id: string;
10
28
  sourceId?: string;
11
29
  beforeId?: string;
@@ -40,6 +40,22 @@ function useReactMapGL() {
40
40
  return mapboxCollection ?? maplibreCollection ?? EMPTY_COLLECTION;
41
41
  }
42
42
 
43
+ /**
44
+ * Copy any defined auth/passthrough props from a layer component's props
45
+ * onto a service-options object. Undefined values are skipped so they
46
+ * do not override service defaults.
47
+ */
48
+ function applyAuthOptions(options, props) {
49
+ const target = options;
50
+ if (props.token !== undefined) target.token = props.token;
51
+ if (props.apiKey !== undefined) target.apiKey = props.apiKey;
52
+ if (props.proxy !== undefined) target.proxy = props.proxy;
53
+ if (props.getAttributionFromService !== undefined) target.getAttributionFromService = props.getAttributionFromService;
54
+ if (props.requestParams !== undefined) target.requestParams = props.requestParams;
55
+ if (props.fetchOptions !== undefined) target.fetchOptions = props.fetchOptions;
56
+ return options;
57
+ }
58
+
43
59
  /**
44
60
  * React Map GL component for Esri Dynamic Map Service
45
61
  */
@@ -80,10 +96,11 @@ function EsriDynamicLayer(props) {
80
96
  if (props.format !== undefined) options.format = props.format;
81
97
  if (props.dpi !== undefined) options.dpi = props.dpi;
82
98
  if (props.transparent !== undefined) options.transparent = props.transparent;
99
+ applyAuthOptions(options, props);
83
100
  return new DynamicMapService(sourceId, mapInstance,
84
101
  // Type assertion for map compatibility
85
102
  options);
86
- }, [map, isMapLoaded, sourceId, props.url, props.layers, props.layerDefs, props.format, props.dpi, props.transparent]);
103
+ }, [map, isMapLoaded, sourceId, props.url, props.layers, props.layerDefs, props.format, props.dpi, props.transparent, props.token, props.apiKey, props.proxy, props.getAttributionFromService, props.requestParams, props.fetchOptions]);
87
104
  useEffect(() => {
88
105
  if (!map || !service) return;
89
106
  const mapInstance = map.getMap?.();
@@ -152,10 +169,12 @@ function EsriTiledLayer(props) {
152
169
  if (!map || !isMapLoaded) return null;
153
170
  const mapInstance = map.getMap?.();
154
171
  if (!mapInstance) return null;
155
- return new TiledMapService(sourceId, mapInstance, {
172
+ const options = {
156
173
  url: props.url
157
- });
158
- }, [map, isMapLoaded, sourceId, props.url]);
174
+ };
175
+ applyAuthOptions(options, props);
176
+ return new TiledMapService(sourceId, mapInstance, options);
177
+ }, [map, isMapLoaded, sourceId, props.url, props.token, props.apiKey, props.proxy, props.getAttributionFromService, props.requestParams, props.fetchOptions]);
159
178
  useEffect(() => {
160
179
  if (!map || !service) return;
161
180
  const mapInstance = map.getMap?.();
@@ -231,8 +250,9 @@ function EsriImageLayer(props) {
231
250
  if (props.renderingRule !== undefined) options.renderingRule = props.renderingRule;
232
251
  if (props.mosaicRule !== undefined) options.mosaicRule = props.mosaicRule;
233
252
  if (props.format !== undefined) options.format = props.format;
253
+ applyAuthOptions(options, props);
234
254
  return new ImageService(sourceId, mapInstance, options);
235
- }, [map, isMapLoaded, sourceId, props.url, props.renderingRule, props.mosaicRule, props.format]);
255
+ }, [map, isMapLoaded, sourceId, props.url, props.renderingRule, props.mosaicRule, props.format, props.token, props.apiKey, props.proxy, props.getAttributionFromService, props.requestParams, props.fetchOptions]);
236
256
  useEffect(() => {
237
257
  if (!map || !service) return;
238
258
  const mapInstance = map.getMap?.();
@@ -304,16 +324,30 @@ function EsriVectorTileLayer(props) {
304
324
  if (!mapInstance) return;
305
325
  const mi = mapInstance;
306
326
  let cancelled = false;
307
- const service = new VectorTileService(sourceId, mapInstance, {
327
+ const options = {
308
328
  url: props.url
309
- });
329
+ };
330
+ applyAuthOptions(options, props);
331
+ const service = new VectorTileService(sourceId, mapInstance, options);
310
332
  serviceRef.current = service;
311
333
  // Fetch the full style and add all layers from it
312
334
  service.getStyle().then(() => {
313
335
  if (cancelled) return;
314
336
  // Fetch the full style document to get all layers
315
- const styleUrl = `${props.url}/resources/styles/root.json`;
316
- return fetch(styleUrl);
337
+ let styleUrl = `${props.url}/resources/styles/root.json`;
338
+ if (props.token) {
339
+ styleUrl += `?token=${encodeURIComponent(props.token)}`;
340
+ }
341
+ const fetchInit = {
342
+ ...(props.fetchOptions || {})
343
+ };
344
+ if (props.apiKey) {
345
+ fetchInit.headers = {
346
+ ...(fetchInit.headers || {}),
347
+ 'X-Esri-Authorization': `Bearer ${props.apiKey}`
348
+ };
349
+ }
350
+ return fetch(styleUrl, fetchInit);
317
351
  }).then(response => {
318
352
  if (cancelled || !response) return;
319
353
  if (!response.ok) throw new Error(`Failed to fetch style: ${response.status}`);
@@ -370,7 +404,7 @@ function EsriVectorTileLayer(props) {
370
404
  service.remove();
371
405
  serviceRef.current = null;
372
406
  };
373
- }, [map, isMapLoaded, sourceId, props.url, props.id, props.beforeId, props.visible]);
407
+ }, [map, isMapLoaded, sourceId, props.url, props.id, props.beforeId, props.visible, props.token, props.apiKey, props.proxy, props.getAttributionFromService, props.requestParams, props.fetchOptions]);
374
408
  return null;
375
409
  }
376
410
 
@@ -446,6 +480,7 @@ function EsriFeatureLayer(props) {
446
480
  };
447
481
  if (props.where !== undefined) options.where = props.where;
448
482
  if (props.outFields !== undefined) options.outFields = props.outFields;
483
+ applyAuthOptions(options, props);
449
484
  const service = new FeatureService(sourceId, mapInstance, options);
450
485
  serviceRef.current = service;
451
486
  // Add GeoJSON layer
@@ -481,7 +516,7 @@ function EsriFeatureLayer(props) {
481
516
  service.remove();
482
517
  serviceRef.current = null;
483
518
  };
484
- }, [map, isMapLoaded, sourceId, props.url, props.where, props.outFields, props.id, props.beforeId, props.visible, props.type]);
519
+ }, [map, isMapLoaded, sourceId, props.url, props.where, props.outFields, props.id, props.beforeId, props.visible, props.type, props.token, props.apiKey, props.proxy, props.getAttributionFromService, props.requestParams, props.fetchOptions]);
485
520
  return null;
486
521
  }
487
522
 
@@ -1 +1 @@
1
- {"version":3,"file":"react-map-gl.js","sources":["../src/react-map-gl/utils/useReactMapGL.ts","../src/react-map-gl/components/EsriDynamicLayer.tsx","../src/react-map-gl/components/EsriTiledLayer.tsx","../src/react-map-gl/components/EsriImageLayer.tsx","../src/react-map-gl/components/EsriVectorTileLayer.tsx","../src/react-map-gl/components/EsriVectorBasemapLayer.tsx","../src/react-map-gl/components/EsriFeatureLayer.tsx","../src/react-map-gl/hooks/useEsriMapboxLayer.ts","../src/react-map-gl/hooks/useEsriMaplibreLayer.ts"],"sourcesContent":["import { useMap as useMapMapbox } from 'react-map-gl/mapbox';\nimport { useMap as useMapMaplibre } from 'react-map-gl/maplibre';\nimport type { MapRef as MapboxMapRef } from 'react-map-gl/mapbox';\nimport type { MapRef as MaplibreMapRef } from 'react-map-gl/maplibre';\n\nexport type ReactMapGLMapRef = MapboxMapRef | MaplibreMapRef;\n\nexport type ReactMapGLMapCollection = {\n current: ReactMapGLMapRef | null;\n [id: string]: ReactMapGLMapRef | null | undefined;\n};\n\nconst EMPTY_COLLECTION: ReactMapGLMapCollection = { current: null };\n\nfunction withFallback<T>(fn: () => T): T | null {\n try {\n return fn();\n } catch {\n // The hook will throw if the corresponding provider is not present.\n return null;\n }\n}\n\nfunction normalizeCollection(\n collection: ReturnType<typeof useMapMapbox> | ReturnType<typeof useMapMaplibre> | null\n): ReactMapGLMapCollection | null {\n if (!collection) {\n return null;\n }\n\n const current = ((collection as { current?: ReactMapGLMapRef }).current ??\n null) as ReactMapGLMapRef | null;\n\n return {\n current,\n ...collection,\n } as ReactMapGLMapCollection;\n}\n\nexport function useReactMapGL(): ReactMapGLMapCollection {\n const mapboxCollection = normalizeCollection(withFallback(useMapMapbox));\n const maplibreCollection = normalizeCollection(withFallback(useMapMaplibre));\n\n if (mapboxCollection?.current) {\n return mapboxCollection;\n }\n\n if (maplibreCollection?.current) {\n return maplibreCollection;\n }\n\n return mapboxCollection ?? maplibreCollection ?? EMPTY_COLLECTION;\n}\n","import { useEffect, useMemo, useState } from 'react';\nimport { DynamicMapService } from '@/Services/DynamicMapService';\nimport type { EsriServiceOptions } from '@/types';\nimport type { EsriDynamicLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\n\n/**\n * React Map GL component for Esri Dynamic Map Service\n */\nexport function EsriDynamicLayer(props: EsriDynamicLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-dynamic-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') {\n return;\n }\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n const service = useMemo(() => {\n if (!map || !isMapLoaded) return null;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return null;\n\n // Only include defined properties to avoid overriding defaults with undefined\n const options: EsriServiceOptions & { url: string } = { url: props.url };\n if (props.layers !== undefined) options.layers = props.layers;\n if (props.layerDefs !== undefined) options.layerDefs = props.layerDefs;\n if (props.format !== undefined) options.format = props.format;\n if (props.dpi !== undefined) options.dpi = props.dpi;\n if (props.transparent !== undefined) options.transparent = props.transparent;\n\n return new DynamicMapService(\n sourceId,\n mapInstance as unknown as import('@/types').Map, // Type assertion for map compatibility\n options\n );\n }, [\n map,\n isMapLoaded,\n sourceId,\n props.url,\n props.layers,\n props.layerDefs,\n props.format,\n props.dpi,\n props.transparent,\n ]);\n\n useEffect(() => {\n if (!map || !service) return;\n\n const mapInstance = map.getMap?.() as any;\n if (\n !mapInstance ||\n typeof mapInstance.getLayer !== 'function' ||\n typeof mapInstance.addLayer !== 'function'\n ) {\n return () => {\n service.remove();\n };\n }\n\n // Add raster layer\n if (!mapInstance.getLayer(props.id)) {\n const layerConfig = {\n id: props.id,\n type: 'raster' as const,\n source: sourceId,\n layout: {\n visibility: (props.visible !== false ? 'visible' : 'none') as 'visible' | 'none',\n },\n };\n\n if (props.beforeId) {\n (mapInstance as any).addLayer(layerConfig as any, props.beforeId as any);\n } else {\n (mapInstance as any).addLayer(layerConfig as any);\n }\n }\n\n // Cleanup function\n return () => {\n if ((mapInstance as any).getStyle?.() && (mapInstance as any).getLayer?.(props.id)) {\n (mapInstance as any).removeLayer(props.id);\n }\n if (service) {\n service.remove();\n }\n };\n }, [map, service, props.id, props.beforeId, props.visible, sourceId]);\n\n return null;\n}\n","import { useEffect, useMemo, useState } from 'react';\nimport { TiledMapService } from '@/Services/TiledMapService';\nimport type { EsriTiledLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\n\n/**\n * React Map GL component for Esri Tiled Map Service\n */\nexport function EsriTiledLayer(props: EsriTiledLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-tiled-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') {\n return;\n }\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n const service = useMemo(() => {\n if (!map || !isMapLoaded) return null;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return null;\n\n return new TiledMapService(sourceId, mapInstance as unknown as import('@/types').Map, {\n url: props.url,\n });\n }, [map, isMapLoaded, sourceId, props.url]);\n\n useEffect(() => {\n if (!map || !service) return;\n\n const mapInstance = map.getMap?.() as any;\n if (\n !mapInstance ||\n typeof mapInstance.getLayer !== 'function' ||\n typeof mapInstance.addLayer !== 'function'\n ) {\n return () => {\n service.remove();\n };\n }\n\n // Add raster layer\n if (!mapInstance.getLayer(props.id)) {\n const layerConfig = {\n id: props.id,\n type: 'raster' as const,\n source: sourceId,\n layout: {\n visibility: (props.visible !== false ? 'visible' : 'none') as 'visible' | 'none',\n },\n };\n\n if (props.beforeId) {\n (mapInstance as any).addLayer(layerConfig as any, props.beforeId as any);\n } else {\n (mapInstance as any).addLayer(layerConfig as any);\n }\n }\n\n // Cleanup function\n return () => {\n if ((mapInstance as any).getStyle?.() && (mapInstance as any).getLayer?.(props.id)) {\n (mapInstance as any).removeLayer(props.id);\n }\n if (service) {\n service.remove();\n }\n };\n }, [map, service, props.id, props.beforeId, props.visible, sourceId]);\n\n return null;\n}\n","import { useEffect, useMemo, useState } from 'react';\nimport { useReactMapGL } from '../utils/useReactMapGL';\nimport { ImageService } from '@/Services/ImageService';\nimport type { ImageServiceOptions } from '@/types';\nimport type { EsriImageLayerProps } from '../types';\n\n/**\n * React Map GL component for Esri Image Service\n */\nexport function EsriImageLayer(props: EsriImageLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-image-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') {\n return;\n }\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n const service = useMemo(() => {\n if (!map || !isMapLoaded) return null;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return null;\n\n // Only include defined properties to avoid overriding defaults with undefined\n const options: Partial<ImageServiceOptions> & { url: string } = { url: props.url };\n if (props.renderingRule !== undefined) options.renderingRule = props.renderingRule;\n if (props.mosaicRule !== undefined) options.mosaicRule = props.mosaicRule;\n if (props.format !== undefined) options.format = props.format as ImageServiceOptions['format'];\n\n return new ImageService(sourceId, mapInstance as unknown as import('@/types').Map, options);\n }, [map, isMapLoaded, sourceId, props.url, props.renderingRule, props.mosaicRule, props.format]);\n\n useEffect(() => {\n if (!map || !service) return;\n\n const mapInstance = map.getMap?.() as any;\n if (\n !mapInstance ||\n typeof mapInstance.getLayer !== 'function' ||\n typeof mapInstance.addLayer !== 'function'\n ) {\n return () => {\n service.remove();\n };\n }\n\n // Add raster layer\n if (!mapInstance.getLayer(props.id)) {\n const layerConfig = {\n id: props.id,\n type: 'raster' as const,\n source: sourceId,\n layout: {\n visibility: (props.visible !== false ? 'visible' : 'none') as 'visible' | 'none',\n },\n };\n\n if (props.beforeId) {\n (mapInstance as any).addLayer(layerConfig as any, props.beforeId as any);\n } else {\n (mapInstance as any).addLayer(layerConfig as any);\n }\n }\n\n // Cleanup function\n return () => {\n if ((mapInstance as any).getStyle?.() && (mapInstance as any).getLayer?.(props.id)) {\n (mapInstance as any).removeLayer(props.id);\n }\n if (service) {\n service.remove();\n }\n };\n }, [map, service, props.id, props.beforeId, props.visible, sourceId]);\n\n return null;\n}\n","import { useEffect, useRef, useState } from 'react';\nimport { VectorTileService } from '@/Services/VectorTileService';\nimport type { EsriVectorTileLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\nimport type { Map } from '@/types';\n\n/**\n * React Map GL component for Esri Vector Tile Service\n */\nexport function EsriVectorTileLayer(props: EsriVectorTileLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-vector-tile-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n const serviceRef = useRef<VectorTileService | null>(null);\n const layerIdsRef = useRef<string[]>([]);\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') return;\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n // Create VectorTileService, fetch style, add layers, and clean up on unmount\n useEffect(() => {\n if (!map || !isMapLoaded) return;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return;\n\n const mi = mapInstance as any;\n let cancelled = false;\n\n const service = new VectorTileService(sourceId, mapInstance as unknown as Map, {\n url: props.url,\n });\n serviceRef.current = service;\n\n // Fetch the full style and add all layers from it\n service\n .getStyle()\n .then(() => {\n if (cancelled) return;\n\n // Fetch the full style document to get all layers\n const styleUrl = `${props.url}/resources/styles/root.json`;\n return fetch(styleUrl);\n })\n .then(response => {\n if (cancelled || !response) return;\n if (!response.ok) throw new Error(`Failed to fetch style: ${response.status}`);\n return response.json();\n })\n .then(data => {\n if (cancelled || !data?.layers) return;\n\n const addedIds: string[] = [];\n for (const layer of data.layers) {\n if (!layer['source-layer']) continue;\n const layerId = `${props.id}-${layer.id}`;\n\n if (mi.getLayer?.(layerId)) continue;\n\n const layerConfig: any = {\n id: layerId,\n type: layer.type,\n source: sourceId,\n 'source-layer': layer['source-layer'],\n };\n if (layer.layout) layerConfig.layout = layer.layout;\n if (layer.paint) layerConfig.paint = layer.paint;\n if (layer.filter) layerConfig.filter = layer.filter;\n if (layer.minzoom !== undefined) layerConfig.minzoom = layer.minzoom;\n if (layer.maxzoom !== undefined) layerConfig.maxzoom = layer.maxzoom;\n\n // Apply visibility from props\n if (props.visible === false) {\n layerConfig.layout = { ...layerConfig.layout, visibility: 'none' };\n }\n\n if (props.beforeId) {\n mi.addLayer(layerConfig, props.beforeId);\n } else {\n mi.addLayer(layerConfig);\n }\n addedIds.push(layerId);\n }\n layerIdsRef.current = addedIds;\n })\n .catch(err => {\n console.warn('EsriVectorTileLayer: failed to load style layers', err);\n });\n\n return () => {\n cancelled = true;\n // Remove layers we added\n if (mi.getStyle?.()) {\n for (const id of layerIdsRef.current) {\n try {\n if (mi.getLayer?.(id)) mi.removeLayer(id);\n } catch {\n // layer may already be gone\n }\n }\n }\n layerIdsRef.current = [];\n service.remove();\n serviceRef.current = null;\n };\n }, [map, isMapLoaded, sourceId, props.url, props.id, props.beforeId, props.visible]);\n\n return null;\n}\n","import { useEffect, useMemo } from 'react';\nimport { VectorBasemapStyle } from '@/Services/VectorBasemapStyle';\nimport type { EsriVectorBasemapLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\n\n/**\n * React Map GL component for Esri Vector Basemap Style\n */\nexport function EsriVectorBasemapLayer(props: EsriVectorBasemapLayerProps) {\n const { current: map } = useReactMapGL();\n\n const service = useMemo(() => {\n return new VectorBasemapStyle(props.basemapEnum, { token: props.token });\n }, [props.basemapEnum, props.token]);\n\n useEffect(() => {\n if (!map || !service) return;\n\n // Vector basemap styles replace the entire map style\n // This is typically handled differently in react-map-gl\n // For now, we'll just ensure cleanup\n\n // Cleanup function\n return () => {\n if (service) {\n service.remove();\n }\n };\n }, [map, service]);\n\n return null;\n}\n","import { useEffect, useRef, useState } from 'react';\nimport { FeatureService } from '@/Services/FeatureService';\nimport type { FeatureServiceOptions } from '@/types';\nimport type { EsriFeatureLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\n\n/**\n * React Map GL component for Esri Feature Service\n */\nexport function EsriFeatureLayer(props: EsriFeatureLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-feature-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n const serviceRef = useRef<FeatureService | null>(null);\n\n // Keep stable refs for object props to avoid effect re-runs on every render\n const paintRef = useRef(props.paint);\n paintRef.current = props.paint;\n const layoutRef = useRef(props.layout);\n layoutRef.current = props.layout;\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') {\n return;\n }\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n // Create FeatureService, add layer, and clean up on unmount\n useEffect(() => {\n if (!map || !isMapLoaded) return;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return;\n\n const mi = mapInstance as any;\n\n // Only include defined properties to avoid overriding defaults with undefined\n const options: Partial<FeatureServiceOptions> & { url: string } = { url: props.url };\n if (props.where !== undefined) options.where = props.where;\n if (props.outFields !== undefined) options.outFields = props.outFields;\n\n const service = new FeatureService(\n sourceId,\n mapInstance as unknown as import('@/types').Map,\n options\n );\n serviceRef.current = service;\n\n // Add GeoJSON layer\n if (\n typeof mi.getLayer === 'function' &&\n typeof mi.addLayer === 'function' &&\n !mi.getLayer(props.id)\n ) {\n const layerType = props.type || 'fill';\n const defaultPaint =\n layerType === 'circle'\n ? { 'circle-radius': 4, 'circle-color': '#888888' }\n : { 'fill-color': '#888888', 'fill-opacity': 0.5 };\n const layerConfig = {\n id: props.id,\n type: layerType,\n source: sourceId,\n paint: paintRef.current || defaultPaint,\n layout: {\n ...layoutRef.current,\n visibility: (props.visible !== false ? 'visible' : 'none') as 'visible' | 'none',\n },\n };\n\n if (props.beforeId) {\n mi.addLayer(layerConfig as any, props.beforeId as any);\n } else {\n mi.addLayer(layerConfig as any);\n }\n }\n\n return () => {\n if (mi.getStyle?.() && mi.getLayer?.(props.id)) {\n mi.removeLayer(props.id);\n }\n service.remove();\n serviceRef.current = null;\n };\n }, [\n map,\n isMapLoaded,\n sourceId,\n props.url,\n props.where,\n props.outFields,\n props.id,\n props.beforeId,\n props.visible,\n props.type,\n ]);\n\n return null;\n}\n","import { useMap } from 'react-map-gl/mapbox';\nimport { useDynamicMapService } from '../../react/hooks/useDynamicMapService';\nimport { useTiledMapService } from '../../react/hooks/useTiledMapService';\nimport { useImageService } from '../../react/hooks/useImageService';\nimport { useVectorTileService } from '../../react/hooks/useVectorTileService';\nimport { useFeatureService } from '../../react/hooks/useFeatureService';\nimport type { Map } from '@/types';\n\n/**\n * Hook for using Esri services with Mapbox GL JS (via react-map-gl)\n */\nexport function useEsriMapboxLayer() {\n const { current: mapRef } = useMap();\n const map = mapRef?.getMap() as unknown as Map | null;\n\n return {\n map,\n useDynamicMapService: (options: Parameters<typeof useDynamicMapService>[0]) =>\n useDynamicMapService({ ...options, map }),\n useTiledMapService: (options: Parameters<typeof useTiledMapService>[0]) =>\n useTiledMapService({ ...options, map }),\n useImageService: (options: Parameters<typeof useImageService>[0]) =>\n useImageService({ ...options, map }),\n useVectorTileService: (options: Parameters<typeof useVectorTileService>[0]) =>\n useVectorTileService({ ...options, map }),\n useFeatureService: (options: Parameters<typeof useFeatureService>[0]) =>\n useFeatureService({ ...options, map }),\n };\n}\n","import { useMap } from 'react-map-gl/maplibre';\nimport { useDynamicMapService } from '../../react/hooks/useDynamicMapService';\nimport { useTiledMapService } from '../../react/hooks/useTiledMapService';\nimport { useImageService } from '../../react/hooks/useImageService';\nimport { useVectorTileService } from '../../react/hooks/useVectorTileService';\nimport { useFeatureService } from '../../react/hooks/useFeatureService';\nimport type { Map } from '@/types';\n\n/**\n * Hook for using Esri services with MapLibre GL JS (via react-map-gl/maplibre)\n */\nexport function useEsriMaplibreLayer() {\n const { current: mapRef } = useMap();\n const map = mapRef?.getMap() as unknown as Map | null;\n\n return {\n map,\n useDynamicMapService: (options: Parameters<typeof useDynamicMapService>[0]) =>\n useDynamicMapService({ ...options, map }),\n useTiledMapService: (options: Parameters<typeof useTiledMapService>[0]) =>\n useTiledMapService({ ...options, map }),\n useImageService: (options: Parameters<typeof useImageService>[0]) =>\n useImageService({ ...options, map }),\n useVectorTileService: (options: Parameters<typeof useVectorTileService>[0]) =>\n useVectorTileService({ ...options, map }),\n useFeatureService: (options: Parameters<typeof useFeatureService>[0]) =>\n useFeatureService({ ...options, map }),\n };\n}\n"],"names":["EMPTY_COLLECTION","current","withFallback","fn","normalizeCollection","collection","useReactMapGL","mapboxCollection","useMapMapbox","maplibreCollection","useMapMaplibre","EsriDynamicLayer","props","map","sourceId","id","isMapLoaded","setIsMapLoaded","useState","useEffect","mapInstance","getMap","mi","isStyleLoaded","handleLoad","once","off","service","useMemo","options","url","layers","undefined","layerDefs","format","dpi","transparent","DynamicMapService","getLayer","addLayer","remove","layerConfig","type","source","layout","visibility","visible","beforeId","getStyle","removeLayer","EsriTiledLayer","TiledMapService","EsriImageLayer","renderingRule","mosaicRule","ImageService","EsriVectorTileLayer","serviceRef","useRef","layerIdsRef","cancelled","VectorTileService","then","styleUrl","fetch","response","ok","Error","status","json","data","addedIds","layer","layerId","paint","filter","minzoom","maxzoom","push","catch","err","console","warn","EsriVectorBasemapLayer","VectorBasemapStyle","basemapEnum","token","EsriFeatureLayer","paintRef","layoutRef","where","outFields","FeatureService","layerType","defaultPaint","useEsriMapboxLayer","mapRef","useMap","useDynamicMapService","useTiledMapService","useImageService","useVectorTileService","useFeatureService","useEsriMaplibreLayer"],"mappings":";;;;;;;;;AAYA,MAAMA,gBAAgB,GAA4B;AAAEC,EAAAA,OAAO,EAAE;CAAM;AAEnE,SAASC,YAAYA,CAAIC,EAAW,EAAA;EAClC,IAAI;IACF,OAAOA,EAAE,EAAE;AACb,EAAA,CAAC,CAAC,MAAM;AACN;AACA,IAAA,OAAO,IAAI;AACb,EAAA;AACF;AAEA,SAASC,mBAAmBA,CAC1BC,UAAsF,EAAA;EAEtF,IAAI,CAACA,UAAU,EAAE;AACf,IAAA,OAAO,IAAI;AACb,EAAA;AAEA,EAAA,MAAMJ,OAAO,GAAKI,UAA6C,CAACJ,OAAO,IACrE,IAAgC;EAElC,OAAO;IACLA,OAAO;IACP,GAAGI;GACuB;AAC9B;SAEgBC,aAAaA,GAAA;EAC3B,MAAMC,gBAAgB,GAAGH,mBAAmB,CAACF,YAAY,CAACM,MAAY,CAAC,CAAC;EACxE,MAAMC,kBAAkB,GAAGL,mBAAmB,CAACF,YAAY,CAACQ,QAAc,CAAC,CAAC;EAE5E,IAAIH,gBAAgB,EAAEN,OAAO,EAAE;AAC7B,IAAA,OAAOM,gBAAgB;AACzB,EAAA;EAEA,IAAIE,kBAAkB,EAAER,OAAO,EAAE;AAC/B,IAAA,OAAOQ,kBAAkB;AAC3B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E,OAAO;AAAEhB,MAAAA;KAAK;GACxC;AACH;;;;"}
1
+ {"version":3,"file":"react-map-gl.js","sources":["../src/react-map-gl/utils/useReactMapGL.ts","../src/react-map-gl/utils/buildServiceOptions.ts","../src/react-map-gl/components/EsriDynamicLayer.tsx","../src/react-map-gl/components/EsriTiledLayer.tsx","../src/react-map-gl/components/EsriImageLayer.tsx","../src/react-map-gl/components/EsriVectorTileLayer.tsx","../src/react-map-gl/components/EsriVectorBasemapLayer.tsx","../src/react-map-gl/components/EsriFeatureLayer.tsx","../src/react-map-gl/hooks/useEsriMapboxLayer.ts","../src/react-map-gl/hooks/useEsriMaplibreLayer.ts"],"sourcesContent":["import { useMap as useMapMapbox } from 'react-map-gl/mapbox';\nimport { useMap as useMapMaplibre } from 'react-map-gl/maplibre';\nimport type { MapRef as MapboxMapRef } from 'react-map-gl/mapbox';\nimport type { MapRef as MaplibreMapRef } from 'react-map-gl/maplibre';\n\nexport type ReactMapGLMapRef = MapboxMapRef | MaplibreMapRef;\n\nexport type ReactMapGLMapCollection = {\n current: ReactMapGLMapRef | null;\n [id: string]: ReactMapGLMapRef | null | undefined;\n};\n\nconst EMPTY_COLLECTION: ReactMapGLMapCollection = { current: null };\n\nfunction withFallback<T>(fn: () => T): T | null {\n try {\n return fn();\n } catch {\n // The hook will throw if the corresponding provider is not present.\n return null;\n }\n}\n\nfunction normalizeCollection(\n collection: ReturnType<typeof useMapMapbox> | ReturnType<typeof useMapMaplibre> | null\n): ReactMapGLMapCollection | null {\n if (!collection) {\n return null;\n }\n\n const current = ((collection as { current?: ReactMapGLMapRef }).current ??\n null) as ReactMapGLMapRef | null;\n\n return {\n current,\n ...collection,\n } as ReactMapGLMapCollection;\n}\n\nexport function useReactMapGL(): ReactMapGLMapCollection {\n const mapboxCollection = normalizeCollection(withFallback(useMapMapbox));\n const maplibreCollection = normalizeCollection(withFallback(useMapMaplibre));\n\n if (mapboxCollection?.current) {\n return mapboxCollection;\n }\n\n if (maplibreCollection?.current) {\n return maplibreCollection;\n }\n\n return mapboxCollection ?? maplibreCollection ?? EMPTY_COLLECTION;\n}\n","import type { EsriAuthProps } from '../types';\n\n/**\n * Copy any defined auth/passthrough props from a layer component's props\n * onto a service-options object. Undefined values are skipped so they\n * do not override service defaults.\n */\nexport function applyAuthOptions<T extends object>(options: T, props: EsriAuthProps): T {\n const target = options as Record<string, unknown>;\n if (props.token !== undefined) target.token = props.token;\n if (props.apiKey !== undefined) target.apiKey = props.apiKey;\n if (props.proxy !== undefined) target.proxy = props.proxy;\n if (props.getAttributionFromService !== undefined)\n target.getAttributionFromService = props.getAttributionFromService;\n if (props.requestParams !== undefined) target.requestParams = props.requestParams;\n if (props.fetchOptions !== undefined) target.fetchOptions = props.fetchOptions;\n return options;\n}\n","import { useEffect, useMemo, useState } from 'react';\nimport { DynamicMapService } from '@/Services/DynamicMapService';\nimport type { EsriServiceOptions } from '@/types';\nimport type { EsriDynamicLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\nimport { applyAuthOptions } from '../utils/buildServiceOptions';\n\n/**\n * React Map GL component for Esri Dynamic Map Service\n */\nexport function EsriDynamicLayer(props: EsriDynamicLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-dynamic-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') {\n return;\n }\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n const service = useMemo(() => {\n if (!map || !isMapLoaded) return null;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return null;\n\n // Only include defined properties to avoid overriding defaults with undefined\n const options: EsriServiceOptions & { url: string } = { url: props.url };\n if (props.layers !== undefined) options.layers = props.layers;\n if (props.layerDefs !== undefined) options.layerDefs = props.layerDefs;\n if (props.format !== undefined) options.format = props.format;\n if (props.dpi !== undefined) options.dpi = props.dpi;\n if (props.transparent !== undefined) options.transparent = props.transparent;\n applyAuthOptions(options, props);\n\n return new DynamicMapService(\n sourceId,\n mapInstance as unknown as import('@/types').Map, // Type assertion for map compatibility\n options\n );\n }, [\n map,\n isMapLoaded,\n sourceId,\n props.url,\n props.layers,\n props.layerDefs,\n props.format,\n props.dpi,\n props.transparent,\n props.token,\n props.apiKey,\n props.proxy,\n props.getAttributionFromService,\n props.requestParams,\n props.fetchOptions,\n ]);\n\n useEffect(() => {\n if (!map || !service) return;\n\n const mapInstance = map.getMap?.() as any;\n if (\n !mapInstance ||\n typeof mapInstance.getLayer !== 'function' ||\n typeof mapInstance.addLayer !== 'function'\n ) {\n return () => {\n service.remove();\n };\n }\n\n // Add raster layer\n if (!mapInstance.getLayer(props.id)) {\n const layerConfig = {\n id: props.id,\n type: 'raster' as const,\n source: sourceId,\n layout: {\n visibility: (props.visible !== false ? 'visible' : 'none') as 'visible' | 'none',\n },\n };\n\n if (props.beforeId) {\n (mapInstance as any).addLayer(layerConfig as any, props.beforeId as any);\n } else {\n (mapInstance as any).addLayer(layerConfig as any);\n }\n }\n\n // Cleanup function\n return () => {\n if ((mapInstance as any).getStyle?.() && (mapInstance as any).getLayer?.(props.id)) {\n (mapInstance as any).removeLayer(props.id);\n }\n if (service) {\n service.remove();\n }\n };\n }, [map, service, props.id, props.beforeId, props.visible, sourceId]);\n\n return null;\n}\n","import { useEffect, useMemo, useState } from 'react';\nimport { TiledMapService } from '@/Services/TiledMapService';\nimport type { EsriServiceOptions } from '@/types';\nimport type { EsriTiledLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\nimport { applyAuthOptions } from '../utils/buildServiceOptions';\n\n/**\n * React Map GL component for Esri Tiled Map Service\n */\nexport function EsriTiledLayer(props: EsriTiledLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-tiled-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') {\n return;\n }\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n const service = useMemo(() => {\n if (!map || !isMapLoaded) return null;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return null;\n\n const options: EsriServiceOptions & { url: string } = { url: props.url };\n applyAuthOptions(options, props);\n\n return new TiledMapService(sourceId, mapInstance as unknown as import('@/types').Map, options);\n }, [\n map,\n isMapLoaded,\n sourceId,\n props.url,\n props.token,\n props.apiKey,\n props.proxy,\n props.getAttributionFromService,\n props.requestParams,\n props.fetchOptions,\n ]);\n\n useEffect(() => {\n if (!map || !service) return;\n\n const mapInstance = map.getMap?.() as any;\n if (\n !mapInstance ||\n typeof mapInstance.getLayer !== 'function' ||\n typeof mapInstance.addLayer !== 'function'\n ) {\n return () => {\n service.remove();\n };\n }\n\n // Add raster layer\n if (!mapInstance.getLayer(props.id)) {\n const layerConfig = {\n id: props.id,\n type: 'raster' as const,\n source: sourceId,\n layout: {\n visibility: (props.visible !== false ? 'visible' : 'none') as 'visible' | 'none',\n },\n };\n\n if (props.beforeId) {\n (mapInstance as any).addLayer(layerConfig as any, props.beforeId as any);\n } else {\n (mapInstance as any).addLayer(layerConfig as any);\n }\n }\n\n // Cleanup function\n return () => {\n if ((mapInstance as any).getStyle?.() && (mapInstance as any).getLayer?.(props.id)) {\n (mapInstance as any).removeLayer(props.id);\n }\n if (service) {\n service.remove();\n }\n };\n }, [map, service, props.id, props.beforeId, props.visible, sourceId]);\n\n return null;\n}\n","import { useEffect, useMemo, useState } from 'react';\nimport { useReactMapGL } from '../utils/useReactMapGL';\nimport { ImageService } from '@/Services/ImageService';\nimport type { ImageServiceOptions } from '@/types';\nimport type { EsriImageLayerProps } from '../types';\nimport { applyAuthOptions } from '../utils/buildServiceOptions';\n\n/**\n * React Map GL component for Esri Image Service\n */\nexport function EsriImageLayer(props: EsriImageLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-image-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') {\n return;\n }\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n const service = useMemo(() => {\n if (!map || !isMapLoaded) return null;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return null;\n\n // Only include defined properties to avoid overriding defaults with undefined\n const options: Partial<ImageServiceOptions> & { url: string } = { url: props.url };\n if (props.renderingRule !== undefined) options.renderingRule = props.renderingRule;\n if (props.mosaicRule !== undefined) options.mosaicRule = props.mosaicRule;\n if (props.format !== undefined) options.format = props.format as ImageServiceOptions['format'];\n applyAuthOptions(options, props);\n\n return new ImageService(sourceId, mapInstance as unknown as import('@/types').Map, options);\n }, [\n map,\n isMapLoaded,\n sourceId,\n props.url,\n props.renderingRule,\n props.mosaicRule,\n props.format,\n props.token,\n props.apiKey,\n props.proxy,\n props.getAttributionFromService,\n props.requestParams,\n props.fetchOptions,\n ]);\n\n useEffect(() => {\n if (!map || !service) return;\n\n const mapInstance = map.getMap?.() as any;\n if (\n !mapInstance ||\n typeof mapInstance.getLayer !== 'function' ||\n typeof mapInstance.addLayer !== 'function'\n ) {\n return () => {\n service.remove();\n };\n }\n\n // Add raster layer\n if (!mapInstance.getLayer(props.id)) {\n const layerConfig = {\n id: props.id,\n type: 'raster' as const,\n source: sourceId,\n layout: {\n visibility: (props.visible !== false ? 'visible' : 'none') as 'visible' | 'none',\n },\n };\n\n if (props.beforeId) {\n (mapInstance as any).addLayer(layerConfig as any, props.beforeId as any);\n } else {\n (mapInstance as any).addLayer(layerConfig as any);\n }\n }\n\n // Cleanup function\n return () => {\n if ((mapInstance as any).getStyle?.() && (mapInstance as any).getLayer?.(props.id)) {\n (mapInstance as any).removeLayer(props.id);\n }\n if (service) {\n service.remove();\n }\n };\n }, [map, service, props.id, props.beforeId, props.visible, sourceId]);\n\n return null;\n}\n","import { useEffect, useRef, useState } from 'react';\nimport { VectorTileService } from '@/Services/VectorTileService';\nimport type { EsriVectorTileLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\nimport type { Map, VectorTileServiceOptions } from '@/types';\nimport { applyAuthOptions } from '../utils/buildServiceOptions';\n\n/**\n * React Map GL component for Esri Vector Tile Service\n */\nexport function EsriVectorTileLayer(props: EsriVectorTileLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-vector-tile-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n const serviceRef = useRef<VectorTileService | null>(null);\n const layerIdsRef = useRef<string[]>([]);\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') return;\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n // Create VectorTileService, fetch style, add layers, and clean up on unmount\n useEffect(() => {\n if (!map || !isMapLoaded) return;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return;\n\n const mi = mapInstance as any;\n let cancelled = false;\n\n const options: VectorTileServiceOptions & { url: string } = { url: props.url };\n applyAuthOptions(options, props);\n\n const service = new VectorTileService(sourceId, mapInstance as unknown as Map, options);\n serviceRef.current = service;\n\n // Fetch the full style and add all layers from it\n service\n .getStyle()\n .then(() => {\n if (cancelled) return;\n\n // Fetch the full style document to get all layers\n let styleUrl = `${props.url}/resources/styles/root.json`;\n if (props.token) {\n styleUrl += `?token=${encodeURIComponent(props.token)}`;\n }\n const fetchInit: RequestInit = { ...(props.fetchOptions || {}) };\n if (props.apiKey) {\n fetchInit.headers = {\n ...(fetchInit.headers || {}),\n 'X-Esri-Authorization': `Bearer ${props.apiKey}`,\n };\n }\n return fetch(styleUrl, fetchInit);\n })\n .then(response => {\n if (cancelled || !response) return;\n if (!response.ok) throw new Error(`Failed to fetch style: ${response.status}`);\n return response.json();\n })\n .then(data => {\n if (cancelled || !data?.layers) return;\n\n const addedIds: string[] = [];\n for (const layer of data.layers) {\n if (!layer['source-layer']) continue;\n const layerId = `${props.id}-${layer.id}`;\n\n if (mi.getLayer?.(layerId)) continue;\n\n const layerConfig: any = {\n id: layerId,\n type: layer.type,\n source: sourceId,\n 'source-layer': layer['source-layer'],\n };\n if (layer.layout) layerConfig.layout = layer.layout;\n if (layer.paint) layerConfig.paint = layer.paint;\n if (layer.filter) layerConfig.filter = layer.filter;\n if (layer.minzoom !== undefined) layerConfig.minzoom = layer.minzoom;\n if (layer.maxzoom !== undefined) layerConfig.maxzoom = layer.maxzoom;\n\n // Apply visibility from props\n if (props.visible === false) {\n layerConfig.layout = { ...layerConfig.layout, visibility: 'none' };\n }\n\n if (props.beforeId) {\n mi.addLayer(layerConfig, props.beforeId);\n } else {\n mi.addLayer(layerConfig);\n }\n addedIds.push(layerId);\n }\n layerIdsRef.current = addedIds;\n })\n .catch(err => {\n console.warn('EsriVectorTileLayer: failed to load style layers', err);\n });\n\n return () => {\n cancelled = true;\n // Remove layers we added\n if (mi.getStyle?.()) {\n for (const id of layerIdsRef.current) {\n try {\n if (mi.getLayer?.(id)) mi.removeLayer(id);\n } catch {\n // layer may already be gone\n }\n }\n }\n layerIdsRef.current = [];\n service.remove();\n serviceRef.current = null;\n };\n }, [\n map,\n isMapLoaded,\n sourceId,\n props.url,\n props.id,\n props.beforeId,\n props.visible,\n props.token,\n props.apiKey,\n props.proxy,\n props.getAttributionFromService,\n props.requestParams,\n props.fetchOptions,\n ]);\n\n return null;\n}\n","import { useEffect, useMemo } from 'react';\nimport { VectorBasemapStyle } from '@/Services/VectorBasemapStyle';\nimport type { EsriVectorBasemapLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\n\n/**\n * React Map GL component for Esri Vector Basemap Style\n */\nexport function EsriVectorBasemapLayer(props: EsriVectorBasemapLayerProps) {\n const { current: map } = useReactMapGL();\n\n const service = useMemo(() => {\n return new VectorBasemapStyle(props.basemapEnum, { token: props.token });\n }, [props.basemapEnum, props.token]);\n\n useEffect(() => {\n if (!map || !service) return;\n\n // Vector basemap styles replace the entire map style\n // This is typically handled differently in react-map-gl\n // For now, we'll just ensure cleanup\n\n // Cleanup function\n return () => {\n if (service) {\n service.remove();\n }\n };\n }, [map, service]);\n\n return null;\n}\n","import { useEffect, useRef, useState } from 'react';\nimport { FeatureService } from '@/Services/FeatureService';\nimport type { FeatureServiceOptions } from '@/types';\nimport type { EsriFeatureLayerProps } from '../types';\nimport { useReactMapGL } from '../utils/useReactMapGL';\nimport { applyAuthOptions } from '../utils/buildServiceOptions';\n\n/**\n * React Map GL component for Esri Feature Service\n */\nexport function EsriFeatureLayer(props: EsriFeatureLayerProps) {\n const { current: map } = useReactMapGL();\n const sourceId = props.sourceId || `esri-feature-${props.id}`;\n const [isMapLoaded, setIsMapLoaded] = useState(false);\n const serviceRef = useRef<FeatureService | null>(null);\n\n // Keep stable refs for object props to avoid effect re-runs on every render\n const paintRef = useRef(props.paint);\n paintRef.current = props.paint;\n const layoutRef = useRef(props.layout);\n layoutRef.current = props.layout;\n\n // Wait for map to be loaded before creating service\n useEffect(() => {\n if (!map) return;\n\n const mapInstance = map.getMap?.();\n const mi = mapInstance as any;\n if (!mi || typeof mi.isStyleLoaded !== 'function') {\n return;\n }\n\n if (mi.isStyleLoaded()) {\n setIsMapLoaded(true);\n return;\n }\n\n const handleLoad = () => setIsMapLoaded(true);\n mi?.once?.('load', handleLoad);\n\n return () => {\n mi?.off?.('load', handleLoad);\n };\n }, [map]);\n\n // Create FeatureService, add layer, and clean up on unmount\n useEffect(() => {\n if (!map || !isMapLoaded) return;\n\n const mapInstance = map.getMap?.();\n if (!mapInstance) return;\n\n const mi = mapInstance as any;\n\n // Only include defined properties to avoid overriding defaults with undefined\n const options: Partial<FeatureServiceOptions> & { url: string } = { url: props.url };\n if (props.where !== undefined) options.where = props.where;\n if (props.outFields !== undefined) options.outFields = props.outFields;\n applyAuthOptions(options, props);\n\n const service = new FeatureService(\n sourceId,\n mapInstance as unknown as import('@/types').Map,\n options\n );\n serviceRef.current = service;\n\n // Add GeoJSON layer\n if (\n typeof mi.getLayer === 'function' &&\n typeof mi.addLayer === 'function' &&\n !mi.getLayer(props.id)\n ) {\n const layerType = props.type || 'fill';\n const defaultPaint =\n layerType === 'circle'\n ? { 'circle-radius': 4, 'circle-color': '#888888' }\n : { 'fill-color': '#888888', 'fill-opacity': 0.5 };\n const layerConfig = {\n id: props.id,\n type: layerType,\n source: sourceId,\n paint: paintRef.current || defaultPaint,\n layout: {\n ...layoutRef.current,\n visibility: (props.visible !== false ? 'visible' : 'none') as 'visible' | 'none',\n },\n };\n\n if (props.beforeId) {\n mi.addLayer(layerConfig as any, props.beforeId as any);\n } else {\n mi.addLayer(layerConfig as any);\n }\n }\n\n return () => {\n if (mi.getStyle?.() && mi.getLayer?.(props.id)) {\n mi.removeLayer(props.id);\n }\n service.remove();\n serviceRef.current = null;\n };\n }, [\n map,\n isMapLoaded,\n sourceId,\n props.url,\n props.where,\n props.outFields,\n props.id,\n props.beforeId,\n props.visible,\n props.type,\n props.token,\n props.apiKey,\n props.proxy,\n props.getAttributionFromService,\n props.requestParams,\n props.fetchOptions,\n ]);\n\n return null;\n}\n","import { useMap } from 'react-map-gl/mapbox';\nimport { useDynamicMapService } from '../../react/hooks/useDynamicMapService';\nimport { useTiledMapService } from '../../react/hooks/useTiledMapService';\nimport { useImageService } from '../../react/hooks/useImageService';\nimport { useVectorTileService } from '../../react/hooks/useVectorTileService';\nimport { useFeatureService } from '../../react/hooks/useFeatureService';\nimport type { Map } from '@/types';\n\n/**\n * Hook for using Esri services with Mapbox GL JS (via react-map-gl)\n */\nexport function useEsriMapboxLayer() {\n const { current: mapRef } = useMap();\n const map = mapRef?.getMap() as unknown as Map | null;\n\n return {\n map,\n useDynamicMapService: (options: Parameters<typeof useDynamicMapService>[0]) =>\n useDynamicMapService({ ...options, map }),\n useTiledMapService: (options: Parameters<typeof useTiledMapService>[0]) =>\n useTiledMapService({ ...options, map }),\n useImageService: (options: Parameters<typeof useImageService>[0]) =>\n useImageService({ ...options, map }),\n useVectorTileService: (options: Parameters<typeof useVectorTileService>[0]) =>\n useVectorTileService({ ...options, map }),\n useFeatureService: (options: Parameters<typeof useFeatureService>[0]) =>\n useFeatureService({ ...options, map }),\n };\n}\n","import { useMap } from 'react-map-gl/maplibre';\nimport { useDynamicMapService } from '../../react/hooks/useDynamicMapService';\nimport { useTiledMapService } from '../../react/hooks/useTiledMapService';\nimport { useImageService } from '../../react/hooks/useImageService';\nimport { useVectorTileService } from '../../react/hooks/useVectorTileService';\nimport { useFeatureService } from '../../react/hooks/useFeatureService';\nimport type { Map } from '@/types';\n\n/**\n * Hook for using Esri services with MapLibre GL JS (via react-map-gl/maplibre)\n */\nexport function useEsriMaplibreLayer() {\n const { current: mapRef } = useMap();\n const map = mapRef?.getMap() as unknown as Map | null;\n\n return {\n map,\n useDynamicMapService: (options: Parameters<typeof useDynamicMapService>[0]) =>\n useDynamicMapService({ ...options, map }),\n useTiledMapService: (options: Parameters<typeof useTiledMapService>[0]) =>\n useTiledMapService({ ...options, map }),\n useImageService: (options: Parameters<typeof useImageService>[0]) =>\n useImageService({ ...options, map }),\n useVectorTileService: (options: Parameters<typeof useVectorTileService>[0]) =>\n useVectorTileService({ ...options, map }),\n useFeatureService: (options: Parameters<typeof useFeatureService>[0]) =>\n useFeatureService({ ...options, map }),\n };\n}\n"],"names":["EMPTY_COLLECTION","current","withFallback","fn","normalizeCollection","collection","useReactMapGL","mapboxCollection","useMapMapbox","maplibreCollection","useMapMaplibre","applyAuthOptions","options","props","target","token","undefined","apiKey","proxy","getAttributionFromService","requestParams","fetchOptions","EsriDynamicLayer","map","sourceId","id","isMapLoaded","setIsMapLoaded","useState","useEffect","mapInstance","getMap","mi","isStyleLoaded","handleLoad","once","off","service","useMemo","url","layers","layerDefs","format","dpi","transparent","DynamicMapService","getLayer","addLayer","remove","layerConfig","type","source","layout","visibility","visible","beforeId","getStyle","removeLayer","EsriTiledLayer","TiledMapService","EsriImageLayer","renderingRule","mosaicRule","ImageService","EsriVectorTileLayer","serviceRef","useRef","layerIdsRef","cancelled","VectorTileService","then","styleUrl","encodeURIComponent","fetchInit","headers","fetch","response","ok","Error","status","json","data","addedIds","layer","layerId","paint","filter","minzoom","maxzoom","push","catch","err","console","warn","EsriVectorBasemapLayer","VectorBasemapStyle","basemapEnum","EsriFeatureLayer","paintRef","layoutRef","where","outFields","FeatureService","layerType","defaultPaint","useEsriMapboxLayer","mapRef","useMap","useDynamicMapService","useTiledMapService","useImageService","useVectorTileService","useFeatureService","useEsriMaplibreLayer"],"mappings":";;;;;;;;;AAYA,MAAMA,gBAAgB,GAA4B;AAAEC,EAAAA,OAAO,EAAE;CAAM;AAEnE,SAASC,YAAYA,CAAIC,EAAW,EAAA;EAClC,IAAI;IACF,OAAOA,EAAE,EAAE;AACb,EAAA,CAAC,CAAC,MAAM;AACN;AACA,IAAA,OAAO,IAAI;AACb,EAAA;AACF;AAEA,SAASC,mBAAmBA,CAC1BC,UAAsF,EAAA;EAEtF,IAAI,CAAC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AAAA,kBAAkB,EAAGjG,OAAiD,IACpEiG,kBAAkB,CAAC;AAAE,MAAA,GAAGjG,OAAO;AAAEW,MAAAA;KAAK,CAAC;AACzCuF,IAAAA,eAAe,EAAGlG,OAA8C,IAC9DkG,eAAe,CAAC;AAAE,MAAA,GAAGlG,OAAO;AAAEW,MAAAA;KAAK,CAAC;AACtCwF,IAAAA,oBAAoB,EAAGnG,OAAmD,IACxEmG,oBAAoB,CAAC;AAAE,MAAA,GAAGnG,OAAO;AAAEW,MAAAA;KAAK,CAAC;AAC3CyF,IAAAA,iBAAiB,EAAGpG,OAAgD,IAClEoG,iBAAiB,CAAC;AAAE,MAAA,GAAGpG,OAAO;AAAEW,MAAAA;KAAK;GACxC;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esri-gl",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "description": "A module for making it easier to use Esri services in mapbox-gl or maplibre-gl.",
6
6
  "main": "dist/index.js",
@@ -96,7 +96,7 @@
96
96
  "@types/react-dom": "^19.2.3",
97
97
  "@typescript-eslint/eslint-plugin": "^8.53.1",
98
98
  "@typescript-eslint/parser": "^8.53.1",
99
- "@vitejs/plugin-react": "^5.1.2",
99
+ "@vitejs/plugin-react": "^6.0.1",
100
100
  "eslint": "^9.39.2",
101
101
  "husky": "^9.1.7",
102
102
  "jest": "^30.2.0",
@@ -115,7 +115,7 @@
115
115
  "ts-jest": "^29.4.6",
116
116
  "tslib": "^2.8.1",
117
117
  "typescript": "^5.9.3",
118
- "vite": "^7.3.1"
118
+ "vite": "^8.0.3"
119
119
  },
120
120
  "repository": {
121
121
  "type": "git",