@honua/app-platform 0.1.9-beta.0 → 0.1.11-beta.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.
Files changed (190) hide show
  1. package/control-plane/admin-client.d.ts +2 -0
  2. package/control-plane/admin-client.d.ts.map +1 -1
  3. package/control-plane/admin-client.js +32 -1
  4. package/control-plane/client.d.ts +1 -1
  5. package/control-plane/client.d.ts.map +1 -1
  6. package/control-plane/client.js +124 -8
  7. package/control-plane/commands/catalog.d.ts +7 -7
  8. package/control-plane/commands/catalog.d.ts.map +1 -1
  9. package/control-plane/commands/catalog.js +27 -15
  10. package/control-plane/commands/runtime.d.ts +6 -6
  11. package/control-plane/commands/runtime.d.ts.map +1 -1
  12. package/control-plane/commands/runtime.js +26 -14
  13. package/control-plane/commands/types.d.ts +4 -2
  14. package/control-plane/commands/types.d.ts.map +1 -1
  15. package/control-plane/generated/admin-api.d.ts +6 -4
  16. package/control-plane/generated/admin-api.d.ts.map +1 -1
  17. package/control-plane/generated/admin-api.js +2 -2
  18. package/control-plane/generated/admin-operations.d.ts +7 -7
  19. package/control-plane/generated/admin-operations.d.ts.map +1 -1
  20. package/control-plane/generated/admin-operations.js +9 -9
  21. package/control-plane/index.d.ts +1 -1
  22. package/control-plane/index.d.ts.map +1 -1
  23. package/control-plane/index.js +1 -1
  24. package/controls/qualification.d.ts.map +1 -1
  25. package/controls/qualification.js +10 -6
  26. package/core/client.d.ts.map +1 -1
  27. package/core/client.js +28 -30
  28. package/core/error-envelope.d.ts +31 -0
  29. package/core/error-envelope.d.ts.map +1 -1
  30. package/core/error-envelope.js +11 -0
  31. package/core/errors.d.ts +15 -3
  32. package/core/errors.d.ts.map +1 -1
  33. package/core/errors.js +254 -2
  34. package/core/geometry-input-sr.d.ts +3 -0
  35. package/core/geometry-input-sr.d.ts.map +1 -0
  36. package/core/geometry-input-sr.js +28 -0
  37. package/core/geoservices.d.ts.map +1 -1
  38. package/core/geoservices.js +33 -6
  39. package/core/grpc-adapter.d.ts.map +1 -1
  40. package/core/grpc-adapter.js +11 -3
  41. package/core/pbf-decoder.d.ts.map +1 -1
  42. package/core/pbf-decoder.js +16 -4
  43. package/core/protocol-transport.d.ts +6 -1
  44. package/core/protocol-transport.d.ts.map +1 -1
  45. package/core/request-pipeline.d.ts +6 -3
  46. package/core/request-pipeline.d.ts.map +1 -1
  47. package/core/request-pipeline.js +28 -11
  48. package/core/spatial-filter.d.ts +4 -4
  49. package/core/spatial-filter.d.ts.map +1 -1
  50. package/core/spatial-filter.js +7 -7
  51. package/core/types.d.ts +14 -3
  52. package/core/types.d.ts.map +1 -1
  53. package/custom-elements.json +341 -0
  54. package/esri-compat/class-breaks-renderer.d.ts +2 -0
  55. package/esri-compat/class-breaks-renderer.d.ts.map +1 -1
  56. package/esri-compat/class-breaks-renderer.js +7 -0
  57. package/esri-compat/controls.d.ts +10 -1
  58. package/esri-compat/controls.d.ts.map +1 -1
  59. package/esri-compat/controls.js +86 -2
  60. package/esri-compat/directions.d.ts +35 -0
  61. package/esri-compat/directions.d.ts.map +1 -1
  62. package/esri-compat/directions.js +153 -2
  63. package/esri-compat/expand.d.ts +1 -0
  64. package/esri-compat/expand.d.ts.map +1 -1
  65. package/esri-compat/expand.js +61 -0
  66. package/esri-compat/feature-layer.d.ts +29 -4
  67. package/esri-compat/feature-layer.d.ts.map +1 -1
  68. package/esri-compat/feature-layer.js +335 -13
  69. package/esri-compat/geometry-engine.d.ts +4 -0
  70. package/esri-compat/geometry-engine.d.ts.map +1 -1
  71. package/esri-compat/geometry-engine.js +8 -1
  72. package/esri-compat/graphic.d.ts +7 -4
  73. package/esri-compat/graphic.d.ts.map +1 -1
  74. package/esri-compat/legend.d.ts +2 -1
  75. package/esri-compat/legend.d.ts.map +1 -1
  76. package/esri-compat/legend.js +15 -0
  77. package/esri-compat/map-view-mount.d.ts +48 -0
  78. package/esri-compat/map-view-mount.d.ts.map +1 -0
  79. package/esri-compat/map-view-mount.js +344 -0
  80. package/esri-compat/map-view.d.ts +38 -6
  81. package/esri-compat/map-view.d.ts.map +1 -1
  82. package/esri-compat/map-view.js +471 -33
  83. package/esri-compat/portal.d.ts +2 -0
  84. package/esri-compat/portal.d.ts.map +1 -1
  85. package/esri-compat/portal.js +7 -2
  86. package/esri-compat/renderer-objects.d.ts +7 -2
  87. package/esri-compat/renderer-objects.d.ts.map +1 -1
  88. package/esri-compat/renderer-objects.js +16 -5
  89. package/esri-compat/route-layer.d.ts +8 -0
  90. package/esri-compat/route-layer.d.ts.map +1 -1
  91. package/esri-compat/route-layer.js +24 -4
  92. package/esri-compat/route-task.d.ts +5 -1
  93. package/esri-compat/route-task.d.ts.map +1 -1
  94. package/esri-compat/route-task.js +119 -7
  95. package/esri-compat/scene-view.d.ts.map +1 -1
  96. package/esri-compat/scene-view.js +1 -0
  97. package/esri-compat/search.d.ts +2 -1
  98. package/esri-compat/search.d.ts.map +1 -1
  99. package/esri-compat/search.js +52 -2
  100. package/esri-compat/unique-value-renderer.d.ts +2 -0
  101. package/esri-compat/unique-value-renderer.d.ts.map +1 -1
  102. package/esri-compat/unique-value-renderer.js +7 -0
  103. package/esri-compat/web-map.d.ts +10 -0
  104. package/esri-compat/web-map.d.ts.map +1 -1
  105. package/esri-compat/web-map.js +102 -0
  106. package/geocoding/index.d.ts +1 -0
  107. package/geocoding/index.d.ts.map +1 -1
  108. package/geocoding/index.js +18 -8
  109. package/geocoding/provider-http.d.ts.map +1 -1
  110. package/geocoding/provider-http.js +3 -1
  111. package/map/webmap-maplibre.d.ts +2 -1
  112. package/map/webmap-maplibre.d.ts.map +1 -1
  113. package/map/webmap-maplibre.js +3 -0
  114. package/package.json +6 -4
  115. package/query-planner/geoservices.d.ts.map +1 -1
  116. package/query-planner/geoservices.js +2 -0
  117. package/query-planner/types.d.ts +2 -0
  118. package/query-planner/types.d.ts.map +1 -1
  119. package/realtime/honua-server.d.ts +4 -0
  120. package/realtime/honua-server.d.ts.map +1 -1
  121. package/realtime/honua-server.js +10 -0
  122. package/realtime/resumable.js +9 -0
  123. package/realtime/types.d.ts +8 -0
  124. package/realtime/types.d.ts.map +1 -1
  125. package/scene-workspace/index.d.ts +2 -2
  126. package/scene-workspace/index.d.ts.map +1 -1
  127. package/scene-workspace/index.js +1 -1
  128. package/scene-workspace/maplibre-state-sync.d.ts.map +1 -1
  129. package/scene-workspace/maplibre-state-sync.js +35 -3
  130. package/scene-workspace/primitives.d.ts +37 -5
  131. package/scene-workspace/primitives.d.ts.map +1 -1
  132. package/scene-workspace/primitives.js +46 -12
  133. package/scene-workspace/state-sync-port-kit.d.ts +1 -1
  134. package/scene-workspace/state-sync-port-kit.d.ts.map +1 -1
  135. package/studio/capability-manifest.d.ts +10 -0
  136. package/studio/capability-manifest.d.ts.map +1 -1
  137. package/studio/capability-manifest.js +38 -0
  138. package/studio/command-adapter.d.ts +35 -0
  139. package/studio/command-adapter.d.ts.map +1 -0
  140. package/studio/command-adapter.js +36 -0
  141. package/studio/generated/studio-api.d.ts +1062 -0
  142. package/studio/generated/studio-api.d.ts.map +1 -0
  143. package/studio/generated/studio-api.js +4 -0
  144. package/studio/index.d.ts +8 -6
  145. package/studio/index.d.ts.map +1 -1
  146. package/studio/index.js +6 -5
  147. package/studio/lifecycle-client.d.ts +3 -3
  148. package/studio/lifecycle-client.d.ts.map +1 -1
  149. package/studio/lifecycle-client.js +41 -22
  150. package/studio/lifecycle-types.d.ts +56 -77
  151. package/studio/lifecycle-types.d.ts.map +1 -1
  152. package/studio/lifecycle-types.js +5 -12
  153. package/studio/types.d.ts +37 -7
  154. package/studio/types.d.ts.map +1 -1
  155. package/studio/types.js +5 -3
  156. package/studio/validate.d.ts.map +1 -1
  157. package/studio/validate.js +104 -7
  158. package/style/renderers.d.ts +6 -1
  159. package/style/renderers.d.ts.map +1 -1
  160. package/style/renderers.js +11 -6
  161. package/style/visual-variables.d.ts +43 -0
  162. package/style/visual-variables.d.ts.map +1 -0
  163. package/style/visual-variables.js +183 -0
  164. package/web-components/index.d.ts +2 -1
  165. package/web-components/index.d.ts.map +1 -1
  166. package/web-components/index.js +1 -0
  167. package/web-components/map-pointer-claim.d.ts +24 -0
  168. package/web-components/map-pointer-claim.d.ts.map +1 -0
  169. package/web-components/map-pointer-claim.js +40 -0
  170. package/web-components/maplibre-renderer.d.ts.map +1 -1
  171. package/web-components/maplibre-renderer.js +5 -1
  172. package/web-components/measurement-units.d.ts +88 -0
  173. package/web-components/measurement-units.d.ts.map +1 -0
  174. package/web-components/measurement-units.js +278 -0
  175. package/web-components/measurement.d.ts +75 -4
  176. package/web-components/measurement.d.ts.map +1 -1
  177. package/web-components/measurement.js +227 -28
  178. package/web-components/types.d.ts +58 -3
  179. package/web-components/types.d.ts.map +1 -1
  180. package/webmap/convert-layer.d.ts +2 -1
  181. package/webmap/convert-layer.d.ts.map +1 -1
  182. package/webmap/convert-layer.js +20 -3
  183. package/webmap/convert-renderer.d.ts +10 -3
  184. package/webmap/convert-renderer.d.ts.map +1 -1
  185. package/webmap/convert-renderer.js +190 -36
  186. package/webmap/index.d.ts +1 -0
  187. package/webmap/index.d.ts.map +1 -1
  188. package/webmap/parse.d.ts +2 -1
  189. package/webmap/parse.d.ts.map +1 -1
  190. package/webmap/parse.js +1 -1
@@ -10,7 +10,7 @@ import { convertLabelingInfo } from "./convert-label.js";
10
10
  import { convertPopupInfo } from "./convert-popup.js";
11
11
  import { convertRenderer } from "./convert-renderer.js";
12
12
  import { warnUnknownProperties } from "./warnings.js";
13
- export function convertOperationalLayer(opLayer, index, warn) {
13
+ export function convertOperationalLayer(opLayer, index, warn, options = {}) {
14
14
  const result = { sources: {}, layers: [] };
15
15
  const layerWarn = warn.child(`operationalLayers[${index}]`);
16
16
  warnUnknownProperties(opLayer, OPERATIONAL_LAYER_PROPERTIES, layerWarn);
@@ -49,7 +49,7 @@ export function convertOperationalLayer(opLayer, index, warn) {
49
49
  warnUnknownProperties(opLayer.layerDefinition?.drawingInfo, DRAWING_INFO_PROPERTIES, layerWarn.child("layerDefinition.drawingInfo"));
50
50
  // Convert renderer
51
51
  const renderer = opLayer.layerDefinition?.drawingInfo?.renderer;
52
- const rendererResult = convertRenderer(renderer, layerWarn.child("layerDefinition.drawingInfo.renderer"));
52
+ const rendererResult = convertRenderer(renderer, layerWarn.child("layerDefinition.drawingInfo.renderer"), options);
53
53
  if (rendererResult) {
54
54
  const layer = {
55
55
  id: layerId,
@@ -80,7 +80,24 @@ export function convertOperationalLayer(opLayer, index, warn) {
80
80
  if (opLayer.title) {
81
81
  layer.metadata = { ...layer.metadata, title: opLayer.title };
82
82
  }
83
+ if (rendererResult.visualVariableLegends?.length) {
84
+ layer.metadata = { ...layer.metadata, "honua:visual-variable-legends": rendererResult.visualVariableLegends };
85
+ }
83
86
  result.layers.push(layer);
87
+ for (const [outlineIndex, extra] of (rendererResult.additionalLayers ?? []).entries()) {
88
+ const outline = {
89
+ ...layer,
90
+ id: `${layerId}-outline-${outlineIndex}`,
91
+ type: extra.layerType,
92
+ paint: { ...extra.paint },
93
+ layout: { ...extra.layout, ...(opLayer.visibility === false ? { visibility: "none" } : {}) },
94
+ };
95
+ if (transparency != null && transparency > 0)
96
+ applyTransparency(outline, transparency);
97
+ if (opLayer.opacity != null && opLayer.opacity < 1)
98
+ applyOpacity(outline, opLayer.opacity);
99
+ result.layers.push(outline);
100
+ }
84
101
  }
85
102
  else if (!renderer) {
86
103
  // No renderer — create a default layer so the source is referenced
@@ -120,7 +137,7 @@ function applyOpacity(layer, opacity) {
120
137
  paint["fill-opacity"] = opacity;
121
138
  break;
122
139
  case "line":
123
- paint["line-opacity"] = opacity;
140
+ paint["line-opacity"] = (typeof paint["line-opacity"] === "number" ? paint["line-opacity"] : 1) * opacity;
124
141
  break;
125
142
  case "circle":
126
143
  paint["circle-opacity"] = opacity;
@@ -10,14 +10,21 @@
10
10
  * @module
11
11
  */
12
12
  import type { ClassBreaksRenderer, UniqueValueRenderer } from "../style/renderers.js";
13
+ import { type RendererConversionOptions, type VisualVariableLegend } from "../style/visual-variables.js";
13
14
  import type { WebMapClassBreaksRenderer, WebMapRenderer, WebMapUniqueValueRenderer } from "./types.js";
14
15
  import type { WarningCollector } from "./warnings.js";
15
16
  export interface RendererConversionResult {
16
17
  layerType: string;
17
18
  paint: Record<string, unknown>;
18
19
  layout: Record<string, unknown>;
20
+ additionalLayers?: {
21
+ layerType: string;
22
+ paint: Record<string, unknown>;
23
+ layout: Record<string, unknown>;
24
+ }[];
25
+ visualVariableLegends?: VisualVariableLegend[];
19
26
  }
20
- export declare function convertRenderer(renderer: WebMapRenderer | undefined, warn: WarningCollector): RendererConversionResult | undefined;
27
+ export declare function convertRenderer(renderer: WebMapRenderer | undefined, warn: WarningCollector, options?: RendererConversionOptions): RendererConversionResult | undefined;
21
28
  /**
22
29
  * Build a first-class unique-value renderer object from WebMap renderer
23
30
  * JSON. Returns `undefined` when the renderer has no value infos or the
@@ -25,7 +32,7 @@ export declare function convertRenderer(renderer: WebMapRenderer | undefined, wa
25
32
  *
26
33
  * @experimental
27
34
  */
28
- export declare function uniqueValueRendererFromWebMap(renderer: WebMapUniqueValueRenderer, warn: WarningCollector): UniqueValueRenderer | undefined;
35
+ export declare function uniqueValueRendererFromWebMap(renderer: WebMapUniqueValueRenderer, warn: WarningCollector, options?: RendererConversionOptions): UniqueValueRenderer | undefined;
29
36
  /**
30
37
  * Build a first-class class-breaks renderer object from WebMap renderer
31
38
  * JSON. Returns `undefined` when the renderer has no break infos, no field,
@@ -34,5 +41,5 @@ export declare function uniqueValueRendererFromWebMap(renderer: WebMapUniqueValu
34
41
  *
35
42
  * @experimental
36
43
  */
37
- export declare function classBreaksRendererFromWebMap(renderer: WebMapClassBreaksRenderer, warn: WarningCollector): ClassBreaksRenderer | undefined;
44
+ export declare function classBreaksRendererFromWebMap(renderer: WebMapClassBreaksRenderer, warn: WarningCollector, options?: RendererConversionOptions): ClassBreaksRenderer | undefined;
38
45
  //# sourceMappingURL=convert-renderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"convert-renderer.d.ts","sourceRoot":"","sources":["../../../src/webmap/convert-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAmC,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGvH,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAgB,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACrH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,IAAI,EAAE,gBAAgB,GACrB,wBAAwB,GAAG,SAAS,CActC;AAmCD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gBAAgB,GACrB,mBAAmB,GAAG,SAAS,CA6BjC;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gBAAgB,GACrB,mBAAmB,GAAG,SAAS,CAgCjC"}
1
+ {"version":3,"file":"convert-renderer.d.ts","sourceRoot":"","sources":["../../../src/webmap/convert-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAmC,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEvH,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAG1B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAgB,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACrH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,gBAAgB,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,EAAE,CAAC;IAC5G,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAChD;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,IAAI,EAAE,gBAAgB,EACtB,OAAO,GAAE,yBAA8B,GACtC,wBAAwB,GAAG,SAAS,CAoBtC;AAwCD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gBAAgB,EACtB,OAAO,GAAE,yBAA8B,GACtC,mBAAmB,GAAG,SAAS,CAgDjC;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gBAAgB,EACtB,OAAO,GAAE,yBAA8B,GACtC,mBAAmB,GAAG,SAAS,CAoDjC"}
@@ -10,41 +10,40 @@
10
10
  * @module
11
11
  */
12
12
  import { classBreaksRenderer, uniqueValueRenderer } from "../style/renderers.js";
13
- import { convertSymbol } from "./convert-symbol.js";
14
- export function convertRenderer(renderer, warn) {
13
+ import { bindRendererField, compileVisualVariables, } from "../style/visual-variables.js";
14
+ import { convertSymbol, esriLineStyleToDashArray } from "./convert-symbol.js";
15
+ export function convertRenderer(renderer, warn, options = {}) {
15
16
  if (!renderer)
16
17
  return undefined;
17
18
  switch (renderer.type) {
18
19
  case "simple":
19
- return convertSimpleRenderer(renderer.symbol, warn);
20
+ return applyVisualVariables(convertRendererSymbol(renderer.symbol, warn, renderer.visualVariables), renderer, warn, options);
20
21
  case "uniqueValue":
21
- return convertUniqueValueRenderer(renderer, warn);
22
+ return convertUniqueValueRenderer(renderer, warn, options);
22
23
  case "classBreaks":
23
- return convertClassBreaksRenderer(renderer, warn);
24
+ return convertClassBreaksRenderer(renderer, warn, options);
24
25
  default:
25
26
  warn.warn("unsupported-renderer", `Unsupported renderer type: ${renderer.type}`, { type: renderer.type });
27
+ compileVisualVariables(renderer.visualVariables, "unknown", {}, warn, options);
26
28
  return undefined;
27
29
  }
28
30
  }
29
- function convertSimpleRenderer(symbol, warn) {
30
- return convertSymbol(symbol, warn);
31
- }
32
- function convertUniqueValueRenderer(renderer, warn) {
31
+ function convertUniqueValueRenderer(renderer, warn, options) {
33
32
  const infos = renderer.uniqueValueInfos ?? [];
34
33
  if (infos.length === 0) {
35
- return convertSymbol(renderer.defaultSymbol, warn);
34
+ return applyVisualVariables(convertRendererSymbol(renderer.defaultSymbol, warn, renderer.visualVariables), renderer, warn, options);
36
35
  }
37
- const rendererObject = uniqueValueRendererFromWebMap(renderer, warn);
36
+ const rendererObject = uniqueValueRendererFromWebMap(renderer, warn, options);
38
37
  if (!rendererObject)
39
38
  return undefined;
40
39
  return compileRendererObject(rendererObject);
41
40
  }
42
- function convertClassBreaksRenderer(renderer, warn) {
41
+ function convertClassBreaksRenderer(renderer, warn, options) {
43
42
  const breaks = renderer.classBreakInfos ?? [];
44
43
  if (breaks.length === 0) {
45
- return convertSymbol(renderer.defaultSymbol, warn);
44
+ return applyVisualVariables(convertRendererSymbol(renderer.defaultSymbol, warn, renderer.visualVariables), renderer, warn, options);
46
45
  }
47
- const rendererObject = classBreaksRendererFromWebMap(renderer, warn);
46
+ const rendererObject = classBreaksRendererFromWebMap(renderer, warn, options);
48
47
  if (!rendererObject)
49
48
  return undefined;
50
49
  return compileRendererObject(rendererObject);
@@ -56,17 +55,22 @@ function convertClassBreaksRenderer(renderer, warn) {
56
55
  *
57
56
  * @experimental
58
57
  */
59
- export function uniqueValueRendererFromWebMap(renderer, warn) {
58
+ export function uniqueValueRendererFromWebMap(renderer, warn, options = {}) {
59
+ warnRendererSemantics(renderer, warn);
60
60
  const infos = renderer.uniqueValueInfos ?? [];
61
- if (infos.length === 0)
61
+ if (infos.length === 0) {
62
+ compileVisualVariables(renderer.visualVariables, "unknown", {}, warn, options);
62
63
  return undefined;
64
+ }
63
65
  // The first valid symbol determines the layer type.
64
- const firstResult = convertSymbol(infos[0].symbol, warn);
65
- if (!firstResult)
66
+ const firstResult = convertRendererSymbol(infos[0].symbol, warn, renderer.visualVariables);
67
+ if (!firstResult) {
68
+ compileVisualVariables(renderer.visualVariables, "unknown", {}, warn, options);
66
69
  return undefined;
70
+ }
67
71
  const values = [];
68
72
  for (const info of infos) {
69
- const symbolResult = convertSymbol(info.symbol, warn);
73
+ const symbolResult = convertRendererSymbol(info.symbol, warn, renderer.visualVariables);
70
74
  if (!symbolResult)
71
75
  continue;
72
76
  values.push({
@@ -75,16 +79,22 @@ export function uniqueValueRendererFromWebMap(renderer, warn) {
75
79
  style: { paint: symbolResult.paint, layout: symbolResult.layout },
76
80
  });
77
81
  }
78
- return uniqueValueRenderer({
79
- field: renderer.field1 ?? "",
80
- ...(renderer.field2 !== undefined ? { field2: renderer.field2 } : {}),
81
- ...(renderer.field3 !== undefined ? { field3: renderer.field3 } : {}),
82
+ const base = uniqueValueRenderer({
83
+ field: bindRendererField(renderer.field1 ?? "", options),
84
+ ...(renderer.field2 !== undefined ? { field2: bindRendererField(renderer.field2, options) } : {}),
85
+ ...(renderer.field3 !== undefined ? { field3: bindRendererField(renderer.field3, options) } : {}),
82
86
  ...(renderer.fieldDelimiter !== undefined ? { fieldDelimiter: renderer.fieldDelimiter } : {}),
83
87
  values,
84
88
  ...(renderer.defaultLabel !== undefined ? { defaultLabel: renderer.defaultLabel } : {}),
85
- ...defaultStyleFromSymbol(renderer.defaultSymbol, warn),
89
+ ...defaultStyleFromSymbol(renderer.defaultSymbol, warn, renderer.visualVariables),
86
90
  layerType: firstResult.layerType,
87
91
  });
92
+ if (renderer.visualVariables === undefined)
93
+ return base;
94
+ return uniqueValueRenderer({
95
+ ...base.toJSON(),
96
+ visualVariableStyle: compileVisualVariables(renderer.visualVariables, firstResult.layerType, base.toMapLibre("polygon")[0].paint, warn, options, ...outlineFromRenderer(renderer, options, warn)),
97
+ });
88
98
  }
89
99
  /**
90
100
  * Build a first-class class-breaks renderer object from WebMap renderer
@@ -94,21 +104,27 @@ export function uniqueValueRendererFromWebMap(renderer, warn) {
94
104
  *
95
105
  * @experimental
96
106
  */
97
- export function classBreaksRendererFromWebMap(renderer, warn) {
107
+ export function classBreaksRendererFromWebMap(renderer, warn, options = {}) {
108
+ warnRendererSemantics(renderer, warn);
98
109
  const breaks = renderer.classBreakInfos ?? [];
99
- if (breaks.length === 0)
110
+ if (breaks.length === 0) {
111
+ compileVisualVariables(renderer.visualVariables, "unknown", {}, warn, options);
100
112
  return undefined;
101
- const firstResult = convertSymbol(breaks[0].symbol, warn);
102
- if (!firstResult)
113
+ }
114
+ const firstResult = convertRendererSymbol(breaks[0].symbol, warn, renderer.visualVariables);
115
+ if (!firstResult) {
116
+ compileVisualVariables(renderer.visualVariables, "unknown", {}, warn, options);
103
117
  return undefined;
118
+ }
104
119
  const field = renderer.field;
105
120
  if (!field) {
106
121
  warn.warn("missing-field", "classBreaks renderer missing field property");
122
+ compileVisualVariables(renderer.visualVariables, "unknown", {}, warn, options);
107
123
  return undefined;
108
124
  }
109
125
  const entries = [];
110
126
  for (const brk of breaks) {
111
- const symbolResult = convertSymbol(brk.symbol, warn);
127
+ const symbolResult = convertRendererSymbol(brk.symbol, warn, renderer.visualVariables);
112
128
  if (!symbolResult)
113
129
  continue;
114
130
  entries.push({
@@ -118,18 +134,24 @@ export function classBreaksRendererFromWebMap(renderer, warn) {
118
134
  style: { paint: symbolResult.paint, layout: symbolResult.layout },
119
135
  });
120
136
  }
121
- return classBreaksRenderer({
122
- field,
137
+ const base = classBreaksRenderer({
138
+ field: bindRendererField(field, options),
123
139
  breaks: entries,
124
140
  ...(renderer.defaultLabel !== undefined ? { defaultLabel: renderer.defaultLabel } : {}),
125
- ...defaultStyleFromSymbol(renderer.defaultSymbol, warn),
141
+ ...defaultStyleFromSymbol(renderer.defaultSymbol, warn, renderer.visualVariables),
126
142
  layerType: firstResult.layerType,
127
143
  });
144
+ if (renderer.visualVariables === undefined)
145
+ return base;
146
+ return classBreaksRenderer({
147
+ ...base.toJSON(),
148
+ visualVariableStyle: compileVisualVariables(renderer.visualVariables, firstResult.layerType, base.toMapLibre("polygon")[0].paint, warn, options, ...outlineFromRenderer(renderer, options, warn)),
149
+ });
128
150
  }
129
- function defaultStyleFromSymbol(defaultSymbol, warn) {
151
+ function defaultStyleFromSymbol(defaultSymbol, warn, variables) {
130
152
  if (!defaultSymbol)
131
153
  return {};
132
- const converted = convertSymbol(defaultSymbol, warn);
154
+ const converted = convertRendererSymbol(defaultSymbol, warn, variables);
133
155
  // A default symbol that fails conversion still overrides the first-entry
134
156
  // fallback: every property defaults to "transparent" (legacy behavior).
135
157
  return { defaultStyle: converted ? { paint: converted.paint, layout: converted.layout } : {} };
@@ -137,6 +159,138 @@ function defaultStyleFromSymbol(defaultSymbol, warn) {
137
159
  function compileRendererObject(renderer) {
138
160
  // The descriptor carries the symbol-derived layer type, so the geometry
139
161
  // argument is inert here; "polygon" is an arbitrary stand-in.
140
- const [fragment] = renderer.toMapLibre("polygon");
141
- return { layerType: fragment.type, paint: fragment.paint, layout: fragment.layout };
162
+ const [fragment, ...additional] = renderer.toMapLibre("polygon");
163
+ return {
164
+ layerType: fragment.type,
165
+ paint: fragment.paint,
166
+ layout: fragment.layout,
167
+ ...(additional.length
168
+ ? { additionalLayers: additional.map((f) => ({ layerType: f.type, paint: f.paint, layout: f.layout })) }
169
+ : {}),
170
+ ...(renderer.visualVariableLegends?.().length
171
+ ? { visualVariableLegends: [...renderer.visualVariableLegends()] }
172
+ : {}),
173
+ };
174
+ }
175
+ function applyVisualVariables(base, renderer, warn, options) {
176
+ const variables = compileVisualVariables(renderer.visualVariables, base?.layerType ?? "unknown", base?.paint ?? {}, warn, options, ...outlineFromRenderer(renderer, options, warn));
177
+ if (!base)
178
+ return undefined;
179
+ const paint = { ...base.paint, ...variables.paint };
180
+ return {
181
+ ...base,
182
+ paint,
183
+ ...(variables.outline ? { additionalLayers: [{ layerType: "line", ...variables.outline }] } : {}),
184
+ ...(variables.legends.length ? { visualVariableLegends: variables.legends } : {}),
185
+ };
186
+ }
187
+ function warnRendererSemantics(renderer, warn) {
188
+ for (const property of ["valueExpression", "normalizationField", "normalizationType", "normalizationTotal"]) {
189
+ if (renderer[property] != null && renderer[property] !== "")
190
+ warn
191
+ .child(property)
192
+ .warn("unsupported-renderer-semantics", `Renderer ${property} is unsupported; the base field renderer is a fallback that requires review.`);
193
+ }
194
+ }
195
+ function convertRendererSymbol(symbol, warn, variables) {
196
+ const result = convertSymbol(symbol, warn);
197
+ if (!result || !symbol || !Array.isArray(variables) || variables.length === 0)
198
+ return result;
199
+ const colorProperty = { fill: "fill-color", line: "line-color", circle: "circle-color" }[result.layerType];
200
+ const color = symbol.color;
201
+ if (colorProperty && Array.isArray(color) && color.length === 4) {
202
+ result.paint[colorProperty] = `rgba(${color[0]},${color[1]},${color[2]},${Number(color[3]) / 255})`;
203
+ if (result.layerType === "fill")
204
+ delete result.paint["fill-opacity"];
205
+ }
206
+ for (const property of ["line-width", "circle-radius", "circle-stroke-width"]) {
207
+ if (typeof result.paint[property] === "number")
208
+ result.paint[property] = (result.paint[property] * 96) / 72;
209
+ }
210
+ const outline = symbol.outline;
211
+ const outlineColor = outline?.color;
212
+ if (Array.isArray(outlineColor) && outlineColor.length === 4) {
213
+ const property = result.layerType === "fill" ? "fill-outline-color" : "circle-stroke-color";
214
+ result.paint[property] =
215
+ `rgba(${outlineColor[0]},${outlineColor[1]},${outlineColor[2]},${Number(outlineColor[3]) / 255})`;
216
+ }
217
+ return result;
218
+ }
219
+ function outlineFromRenderer(renderer, options, warn) {
220
+ const variables = renderer.visualVariables;
221
+ if (!Array.isArray(variables) || !variables.some((v) => v?.type === "sizeInfo" && v?.target === "outline"))
222
+ return [0, {}];
223
+ const symbols = renderer.type === "simple"
224
+ ? [{ symbol: renderer.symbol, path: "symbol" }]
225
+ : renderer.type === "classBreaks"
226
+ ? (renderer.classBreakInfos ?? []).map((entry, i) => ({
227
+ symbol: entry.symbol,
228
+ path: `classBreakInfos[${i}].symbol`,
229
+ }))
230
+ : (renderer.uniqueValueInfos ?? []).map((entry, i) => ({
231
+ symbol: entry.symbol,
232
+ path: `uniqueValueInfos[${i}].symbol`,
233
+ }));
234
+ if (renderer.defaultSymbol)
235
+ symbols.push({ symbol: renderer.defaultSymbol, path: "defaultSymbol" });
236
+ const styles = symbols.map(({ symbol, path }) => ({
237
+ style: symbol?.outline?.style ?? "esriSLSSolid",
238
+ path,
239
+ }));
240
+ const firstStyle = styles[0]?.style ?? "esriSLSSolid";
241
+ const paint = {};
242
+ for (const { style, path } of styles) {
243
+ if (style !== firstStyle || (style !== "esriSLSSolid" && !esriLineStyleToDashArray(style))) {
244
+ warn
245
+ .child(`${path}.outline.style`)
246
+ .warn("unsupported-renderer-semantics", "Varying or unknown polygon outline dash styles require separate layers; review the converted outline style.");
247
+ }
248
+ }
249
+ if (firstStyle === "esriSLSNull")
250
+ paint["line-opacity"] = 0;
251
+ else {
252
+ const dash = esriLineStyleToDashArray(firstStyle);
253
+ if (dash)
254
+ paint["line-dasharray"] = dash;
255
+ }
256
+ const width = (symbol) => {
257
+ const outline = symbol?.outline;
258
+ return typeof outline?.width === "number" ? (outline.width * 96) / 72 : 0;
259
+ };
260
+ if (renderer.type === "simple")
261
+ return [width(renderer.symbol), paint];
262
+ if (renderer.type === "classBreaks") {
263
+ const input = renderer;
264
+ if (!input.field || !input.classBreakInfos?.length)
265
+ return [width(input.defaultSymbol), paint];
266
+ return [
267
+ classBreaksRenderer({
268
+ field: bindRendererField(input.field, options),
269
+ breaks: input.classBreakInfos.map((entry) => ({
270
+ min: entry.classMinValue,
271
+ max: entry.classMaxValue,
272
+ style: { paint: { "line-width": width(entry.symbol) } },
273
+ })),
274
+ ...(input.defaultSymbol ? { defaultStyle: { paint: { "line-width": width(input.defaultSymbol) } } } : {}),
275
+ }).toMapLibre("line")[0].paint["line-width"],
276
+ paint,
277
+ ];
278
+ }
279
+ const input = renderer;
280
+ if (!input.uniqueValueInfos?.length)
281
+ return [width(input.defaultSymbol), paint];
282
+ return [
283
+ uniqueValueRenderer({
284
+ field: bindRendererField(input.field1 ?? "", options),
285
+ field2: input.field2 ? bindRendererField(input.field2, options) : undefined,
286
+ field3: input.field3 ? bindRendererField(input.field3, options) : undefined,
287
+ fieldDelimiter: input.fieldDelimiter,
288
+ values: input.uniqueValueInfos.map((entry) => ({
289
+ value: entry.value,
290
+ style: { paint: { "line-width": width(entry.symbol) } },
291
+ })),
292
+ ...(input.defaultSymbol ? { defaultStyle: { paint: { "line-width": width(input.defaultSymbol) } } } : {}),
293
+ }).toMapLibre("line")[0].paint["line-width"],
294
+ paint,
295
+ ];
142
296
  }
package/webmap/index.d.ts CHANGED
@@ -41,4 +41,5 @@ export type { ExtentConversionResult } from "./convert-extent.js";
41
41
  export { convertOperationalLayer } from "./convert-layer.js";
42
42
  export type { LayerConversionResult } from "./convert-layer.js";
43
43
  export type { WebMapJson, WebMapOperationalLayer, WebMapRenderer, WebMapSimpleRenderer, WebMapUniqueValueRenderer, WebMapClassBreaksRenderer, WebMapSymbol, WebMapSimpleFillSymbol, WebMapSimpleLineSymbol, WebMapSimpleMarkerSymbol, WebMapPictureMarkerSymbol, WebMapTextSymbol, WebMapBaseMap, WebMapBaseMapLayer, WebMapPopupInfo, WebMapFieldInfo, WebMapExtent, WebMapPoint, WebMapViewpoint, WebMapViewpointTargetGeometry, WebMapInitialState, WebMapBookmark, WebMapSpatialReference, WebMapLabelClass, WebMapDrawingInfo, WebMapLayerDefinition, EsriColor, } from "./types.js";
44
+ export type { RendererConversionOptions, VisualVariableLegend } from "../style/visual-variables.js";
44
45
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webmap/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EACV,UAAU,EACV,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,EACX,eAAe,EACf,6BAA6B,EAC7B,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,GACV,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webmap/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EACV,UAAU,EACV,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,EACX,eAAe,EACf,6BAA6B,EAC7B,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,GACV,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
package/webmap/parse.d.ts CHANGED
@@ -4,10 +4,11 @@
4
4
  * @module
5
5
  */
6
6
  import type { HonuaStyleSpecification } from "../style/specification.js";
7
+ import type { RendererConversionOptions } from "../style/visual-variables.js";
7
8
  import type { HonuaPopupConfig } from "./convert-popup.js";
8
9
  import type { WebMapBookmark, WebMapJson } from "./types.js";
9
10
  import { type WebMapWarning } from "./warnings.js";
10
- export interface ParseWebMapOptions {
11
+ export interface ParseWebMapOptions extends RendererConversionOptions {
11
12
  /** If true, include basemap layers. Defaults to true. */
12
13
  includeBasemap?: boolean;
13
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/webmap/parse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAA0B,MAAM,YAAY,CAAC;AACrF,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,KAAK,EAAE,uBAAuB,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,yCAAyC;IACzC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC1C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CAoD9F"}
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/webmap/parse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAI9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAA0B,MAAM,YAAY,CAAC;AACrF,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,kBAAmB,SAAQ,yBAAyB;IACnE,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,KAAK,EAAE,uBAAuB,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,yCAAyC;IACzC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC1C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CAoD9F"}
package/webmap/parse.js CHANGED
@@ -27,7 +27,7 @@ export function parseWebMap(input, options) {
27
27
  const opLayers = input.operationalLayers;
28
28
  for (let i = 0; i < opLayers.length; i++) {
29
29
  const opLayer = opLayers[i];
30
- const layerResult = convertOperationalLayer(opLayer, i, warn);
30
+ const layerResult = convertOperationalLayer(opLayer, i, warn, options);
31
31
  Object.assign(sources, layerResult.sources);
32
32
  layers.push(...layerResult.layers);
33
33
  if (layerResult.popup) {