@feltmaps/js-sdk 1.5.0-next.21 → 1.5.0-next.22

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.
@@ -4012,8 +4012,16 @@ interface HighlighterElementUpdate extends zInfer<typeof HighlighterUpdateSchema
4012
4012
  coordinates?: LngLatTuple[][][];
4013
4013
  }
4014
4014
  interface TextElementUpdate extends zInfer<typeof TextUpdateSchema> {
4015
+ /**
4016
+ * The geographical position of the center of the text element.
4017
+ */
4018
+ position?: LngLatTuple;
4015
4019
  }
4016
4020
  interface NoteElementUpdate extends zInfer<typeof NoteUpdateSchema> {
4021
+ /**
4022
+ * The geographical position of the center of the note element.
4023
+ */
4024
+ position?: LngLatTuple;
4017
4025
  }
4018
4026
  interface ImageElementUpdate extends zInfer<typeof ImageUpdateSchema> {
4019
4027
  }
@@ -4215,7 +4223,7 @@ declare const LayerProcessingStatusSchema: z.ZodEnum<["processing", "completed",
4215
4223
  */
4216
4224
  interface LayerCommon {
4217
4225
  /**
4218
- * The string identifying the layer
4226
+ * A string identifying the layer
4219
4227
  */
4220
4228
  id: string;
4221
4229
  /**
@@ -4381,12 +4389,22 @@ declare const GeoJsonUrlVectorSourceSchema: z.ZodObject<{
4381
4389
  * The remote URL of the GeoJSON file used to populate the layer.
4382
4390
  */
4383
4391
  url: z.ZodString;
4392
+ /**
4393
+ * The interval in milliseconds between automatic refreshes of the GeoJSON.
4394
+ *
4395
+ * The value must be in the range of 250ms - 5 minutes (300,000ms).
4396
+ *
4397
+ * If the value is `null`, the GeoJSON will not be refreshed automatically.
4398
+ */
4399
+ refreshInterval: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4384
4400
  }, "strip", z.ZodTypeAny, {
4385
4401
  type: "geoJsonUrl";
4386
4402
  url: string;
4403
+ refreshInterval?: number | null | undefined;
4387
4404
  }, {
4388
4405
  type: "geoJsonUrl";
4389
4406
  url: string;
4407
+ refreshInterval?: number | null | undefined;
4390
4408
  }>;
4391
4409
  /**
4392
4410
  * A GeoJSON URL source is a layer that is populated from a GeoJSON file at a remote URL.
@@ -4413,6 +4431,8 @@ interface GeoJsonDataVectorSource {
4413
4431
  type: "geoJsonData";
4414
4432
  /**
4415
4433
  * The GeoJSON data for the layer.
4434
+ *
4435
+ * This must be a GeoJSON FeatureCollection.
4416
4436
  */
4417
4437
  data: object;
4418
4438
  }
@@ -4443,6 +4463,144 @@ declare const GeoJsonFileVectorSourceSchema: z.ZodObject<{
4443
4463
  */
4444
4464
  interface GeoJsonFileVectorSource extends zInfer<typeof GeoJsonFileVectorSourceSchema> {
4445
4465
  }
4466
+ /**
4467
+ * The parameters for the {@link LayersController.updateLayer} method.
4468
+ */
4469
+ declare const UpdateLayerSchema: z.ZodObject<{
4470
+ /**
4471
+ * The id of the layer to update.
4472
+ */
4473
+ id: z.ZodString;
4474
+ style: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
4475
+ /**
4476
+ * Changes whether the layer is shown in the legend.
4477
+ */
4478
+ shownInLegend: z.ZodOptional<z.ZodBoolean>;
4479
+ /**
4480
+ * Changes the name of the layer.
4481
+ */
4482
+ name: z.ZodOptional<z.ZodString>;
4483
+ /**
4484
+ * Changes the caption of the layer.
4485
+ */
4486
+ caption: z.ZodOptional<z.ZodString>;
4487
+ /**
4488
+ * Changes the description of the layer.
4489
+ */
4490
+ description: z.ZodOptional<z.ZodString>;
4491
+ /**
4492
+ * Changes the bounds of the layer.
4493
+ */
4494
+ bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
4495
+ source: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
4496
+ /**
4497
+ * Identifies this as a GeoJSON URL source.
4498
+ */
4499
+ type: z.ZodLiteral<"geoJsonUrl">;
4500
+ /**
4501
+ * The remote URL of the GeoJSON file used to populate the layer.
4502
+ */
4503
+ url: z.ZodString;
4504
+ /**
4505
+ * The interval in milliseconds between automatic refreshes of the GeoJSON.
4506
+ *
4507
+ * The value must be in the range of 250ms - 5 minutes (300,000ms).
4508
+ *
4509
+ * If the value is `null`, the GeoJSON will not be refreshed automatically.
4510
+ */
4511
+ refreshInterval: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4512
+ }, "strip", z.ZodTypeAny, {
4513
+ type: "geoJsonUrl";
4514
+ url: string;
4515
+ refreshInterval?: number | null | undefined;
4516
+ }, {
4517
+ type: "geoJsonUrl";
4518
+ url: string;
4519
+ refreshInterval?: number | null | undefined;
4520
+ }>, z.ZodObject<{
4521
+ type: z.ZodLiteral<"geoJsonData">;
4522
+ data: z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>]>;
4523
+ }, "strip", z.ZodTypeAny, {
4524
+ type: "geoJsonData";
4525
+ data: ArrayBuffer | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">;
4526
+ }, {
4527
+ type: "geoJsonData";
4528
+ data: ArrayBuffer | z.objectInputType<{}, z.ZodTypeAny, "passthrough">;
4529
+ }>, z.ZodObject<{
4530
+ /**
4531
+ * Identifies this as a GeoJSON file source.
4532
+ */
4533
+ type: z.ZodLiteral<"geoJsonFile">;
4534
+ /**
4535
+ * The GeoJSON file for the layer.
4536
+ */
4537
+ file: z.ZodType<File, z.ZodTypeDef, File>;
4538
+ }, "strip", z.ZodTypeAny, {
4539
+ type: "geoJsonFile";
4540
+ file: File;
4541
+ }, {
4542
+ type: "geoJsonFile";
4543
+ file: File;
4544
+ }>]>>;
4545
+ }, "strip", z.ZodTypeAny, {
4546
+ id: string;
4547
+ name?: string | undefined;
4548
+ description?: string | undefined;
4549
+ style?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4550
+ source?: {
4551
+ type: "geoJsonUrl";
4552
+ url: string;
4553
+ refreshInterval?: number | null | undefined;
4554
+ } | {
4555
+ type: "geoJsonFile";
4556
+ file: File;
4557
+ } | {
4558
+ type: "geoJsonData";
4559
+ data: ArrayBuffer | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">;
4560
+ } | undefined;
4561
+ bounds?: [number, number, number, number] | undefined;
4562
+ caption?: string | undefined;
4563
+ shownInLegend?: boolean | undefined;
4564
+ }, {
4565
+ id: string;
4566
+ name?: string | undefined;
4567
+ description?: string | undefined;
4568
+ style?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4569
+ source?: {
4570
+ type: "geoJsonUrl";
4571
+ url: string;
4572
+ refreshInterval?: number | null | undefined;
4573
+ } | {
4574
+ type: "geoJsonFile";
4575
+ file: File;
4576
+ } | {
4577
+ type: "geoJsonData";
4578
+ data: ArrayBuffer | z.objectInputType<{}, z.ZodTypeAny, "passthrough">;
4579
+ } | undefined;
4580
+ bounds?: [number, number, number, number] | undefined;
4581
+ caption?: string | undefined;
4582
+ shownInLegend?: boolean | undefined;
4583
+ }>;
4584
+ /**
4585
+ * The value you need to pass to {@link LayersController.updateLayer}
4586
+ *
4587
+ * @group Layers
4588
+ */
4589
+ interface UpdateLayerParams extends Omit<zInfer<typeof UpdateLayerSchema>, "style" | "source"> {
4590
+ /**
4591
+ * The style of the layer.
4592
+ */
4593
+ style?: object;
4594
+ /**
4595
+ * Updates the source of the layer.
4596
+ *
4597
+ * Only layers that have a GeoJSON source can have their source udpated.
4598
+ *
4599
+ * For URL sources, if you pass the same URL again it will cause the data to be
4600
+ * refreshed.
4601
+ */
4602
+ source?: GeoJsonUrlVectorSource | GeoJsonDataVectorSource | GeoJsonFileVectorSource;
4603
+ }
4446
4604
  /**
4447
4605
  * A data-only layer doesn't have any geometry, but can be used to join with other layers
4448
4606
  *
@@ -4916,25 +5074,31 @@ declare const CreateLayersFromGeoJsonSchema: z.ZodObject<{
4916
5074
  * The remote URL of the GeoJSON file used to populate the layer.
4917
5075
  */
4918
5076
  url: z.ZodString;
5077
+ /**
5078
+ * The interval in milliseconds between automatic refreshes of the GeoJSON.
5079
+ *
5080
+ * The value must be in the range of 250ms - 5 minutes (300,000ms).
5081
+ *
5082
+ * If the value is `null`, the GeoJSON will not be refreshed automatically.
5083
+ */
5084
+ refreshInterval: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4919
5085
  }, "strip", z.ZodTypeAny, {
4920
5086
  type: "geoJsonUrl";
4921
5087
  url: string;
5088
+ refreshInterval?: number | null | undefined;
4922
5089
  }, {
4923
5090
  type: "geoJsonUrl";
4924
5091
  url: string;
5092
+ refreshInterval?: number | null | undefined;
4925
5093
  }>, z.ZodObject<{
4926
5094
  type: z.ZodLiteral<"geoJsonData">;
4927
- data: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
5095
+ data: z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>]>;
4928
5096
  }, "strip", z.ZodTypeAny, {
4929
5097
  type: "geoJsonData";
4930
- data: {} & {
4931
- [k: string]: unknown;
4932
- };
5098
+ data: ArrayBuffer | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">;
4933
5099
  }, {
4934
5100
  type: "geoJsonData";
4935
- data: {} & {
4936
- [k: string]: unknown;
4937
- };
5101
+ data: ArrayBuffer | z.objectInputType<{}, z.ZodTypeAny, "passthrough">;
4938
5102
  }>, z.ZodObject<{
4939
5103
  /**
4940
5104
  * Identifies this as a GeoJSON file source.
@@ -4955,6 +5119,21 @@ declare const CreateLayersFromGeoJsonSchema: z.ZodObject<{
4955
5119
  * The name of the layer to create.
4956
5120
  */
4957
5121
  name: z.ZodString;
5122
+ /**
5123
+ * Sets the bounds of the layer.
5124
+ */
5125
+ bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
5126
+ /**
5127
+ * Sets the caption of the layer.
5128
+ */
5129
+ caption: z.ZodOptional<z.ZodString>;
5130
+ /**
5131
+ * Sets the description of the layer.
5132
+ */
5133
+ description: z.ZodOptional<z.ZodString>;
5134
+ /**
5135
+ * Sets the styles to apply to each geometry on the layer.
5136
+ */
4958
5137
  geometryStyles: z.ZodOptional<z.ZodObject<{
4959
5138
  Point: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
4960
5139
  Line: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
@@ -4973,15 +5152,17 @@ declare const CreateLayersFromGeoJsonSchema: z.ZodObject<{
4973
5152
  source: {
4974
5153
  type: "geoJsonUrl";
4975
5154
  url: string;
4976
- } | {
4977
- type: "geoJsonData";
4978
- data: {} & {
4979
- [k: string]: unknown;
4980
- };
5155
+ refreshInterval?: number | null | undefined;
4981
5156
  } | {
4982
5157
  type: "geoJsonFile";
4983
5158
  file: File;
5159
+ } | {
5160
+ type: "geoJsonData";
5161
+ data: ArrayBuffer | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">;
4984
5162
  };
5163
+ description?: string | undefined;
5164
+ bounds?: [number, number, number, number] | undefined;
5165
+ caption?: string | undefined;
4985
5166
  geometryStyles?: {
4986
5167
  Point?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4987
5168
  Polygon?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
@@ -4992,15 +5173,17 @@ declare const CreateLayersFromGeoJsonSchema: z.ZodObject<{
4992
5173
  source: {
4993
5174
  type: "geoJsonUrl";
4994
5175
  url: string;
4995
- } | {
4996
- type: "geoJsonData";
4997
- data: {} & {
4998
- [k: string]: unknown;
4999
- };
5176
+ refreshInterval?: number | null | undefined;
5000
5177
  } | {
5001
5178
  type: "geoJsonFile";
5002
5179
  file: File;
5180
+ } | {
5181
+ type: "geoJsonData";
5182
+ data: ArrayBuffer | z.objectInputType<{}, z.ZodTypeAny, "passthrough">;
5003
5183
  };
5184
+ description?: string | undefined;
5185
+ bounds?: [number, number, number, number] | undefined;
5186
+ caption?: string | undefined;
5004
5187
  geometryStyles?: {
5005
5188
  Point?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
5006
5189
  Polygon?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
@@ -6471,4 +6654,4 @@ declare const ViewportFitBoundsParamsSchema: z.ZodObject<{
6471
6654
  bounds: [number, number, number, number];
6472
6655
  }>;
6473
6656
 
6474
- export type { HighlighterElementRead as $, AggregationMethod as A, MapDetails as B, CreateLayersFromGeoJsonParams as C, EntityNode as D, Element as E, Filters as F, GeoJsonGeometry as G, FeatureSelection as H, InputToolSettings as I, ConfigurableToolType as J, ToolSettingsMap as K, Layer as L, MapInteractionEvent as M, ToolSettingsChangeEvent as N, zInfer as O, SortConfig as P, SetViewportCenterZoomParams as Q, ViewportConstraints as R, SetVisibilityRequest as S, ToolType as T, ViewportFitBoundsParams as U, ViewportState as V, ViewportCenterZoom as W, CircleElementCreate as X, CircleElementRead as Y, CircleElementUpdate as Z, HighlighterElementCreate as _, GetElementsConstraint as a, PointGeometry as a$, HighlighterElementUpdate as a0, ImageElementCreate as a1, ImageElementRead as a2, ImageElementUpdate as a3, LinkElementRead as a4, MarkerElementCreate as a5, MarkerElementRead as a6, MarkerElementUpdate as a7, NoteElementCreate as a8, NoteElementRead as a9, LayerSchemaBooleanAttribute as aA, LayerSchemaCommonAttribute as aB, LayerSchemaDateAttribute as aC, LayerSchemaDateTimeAttribute as aD, LayerSchemaNumericAttribute as aE, LayerSchemaTextAttribute as aF, FilterExpression as aG, FilterLogicGate as aH, FilterTernary as aI, AggregationConfig as aJ, GeometryFilter as aK, MultiAggregationConfig as aL, ValueConfiguration as aM, ElementGroupNode as aN, ElementNode as aO, FeatureNode as aP, LayerGroupNode as aQ, LayerNode as aR, FeltBoundary as aS, FeltZoom as aT, GeoJsonProperties as aU, LatLng as aV, LineStringGeometry as aW, LngLatTuple as aX, MultiLineStringGeometry as aY, MultiPointGeometry as aZ, MultiPolygonGeometry as a_, NoteElementUpdate as aa, PathElementCreate as ab, PathElementRead as ac, PathElementUpdate as ad, PlaceElementCreate as ae, PlaceElementRead as af, PlaceElementUpdate as ag, PolygonElementCreate as ah, PolygonElementRead as ai, PolygonElementUpdate as aj, TextElementCreate as ak, TextElementRead as al, TextElementUpdate as am, DataOnlyLayer as an, FeltTiledVectorSource as ao, GeoJsonDataVectorSource as ap, GeoJsonFileVectorSource as aq, GeoJsonUrlVectorSource as ar, LayerCommon as as, LayerProcessingStatus as at, RasterBand as au, RasterLayer as av, RasterLayerSource as aw, RasterValue as ax, VectorLayer as ay, LayerSchemaAttribute as az, ElementGroup as b, PolygonGeometry as b0, SortDirection as b1, CircleToolSettings as b2, HighlighterToolSettings as b3, LineToolSettings as b4, MarkerToolSettings as b5, NoteToolSettings as b6, PinToolSettings as b7, PlaceFrame as b8, PlaceSymbol as b9, PolygonToolSettings as ba, RouteToolSettings as bb, TextToolSettings as bc, UnionToIntersection as bd, PromiseOrNot as be, GetElementGroupsConstraint as c, ElementChangeCallbackParams as d, ElementGroupChangeCallbackParams as e, ElementCreate as f, ElementUpdate as g, GetLayersConstraint as h, LayerChangeCallbackParams as i, LayerGroup as j, GetLayerGroupsConstraint as k, LayerGroupChangeCallbackParams as l, LegendItemIdentifier as m, LegendItem as n, LegendItemsConstraint as o, LegendItemChangeCallbackParams as p, LayerFilters as q, GetRenderedFeaturesConstraint as r, LayerFeature as s, GeoJsonFeature as t, GetLayerCategoriesParams as u, GetLayerCategoriesGroup as v, GetLayerHistogramParams as w, GetLayerHistogramBin as x, GetLayerCalculationParams as y, LayerSchema as z };
6657
+ export type { HighlighterElementCreate as $, AggregationMethod as A, MapDetails as B, CreateLayersFromGeoJsonParams as C, EntityNode as D, Element as E, Filters as F, GeoJsonGeometry as G, FeatureSelection as H, InputToolSettings as I, ConfigurableToolType as J, ToolSettingsMap as K, Layer as L, MapInteractionEvent as M, ToolSettingsChangeEvent as N, zInfer as O, SortConfig as P, SetViewportCenterZoomParams as Q, ViewportConstraints as R, SetVisibilityRequest as S, ToolType as T, UpdateLayerParams as U, ViewportState as V, ViewportFitBoundsParams as W, ViewportCenterZoom as X, CircleElementCreate as Y, CircleElementRead as Z, CircleElementUpdate as _, GetElementsConstraint as a, MultiPolygonGeometry as a$, HighlighterElementRead as a0, HighlighterElementUpdate as a1, ImageElementCreate as a2, ImageElementRead as a3, ImageElementUpdate as a4, LinkElementRead as a5, MarkerElementCreate as a6, MarkerElementRead as a7, MarkerElementUpdate as a8, NoteElementCreate as a9, LayerSchemaAttribute as aA, LayerSchemaBooleanAttribute as aB, LayerSchemaCommonAttribute as aC, LayerSchemaDateAttribute as aD, LayerSchemaDateTimeAttribute as aE, LayerSchemaNumericAttribute as aF, LayerSchemaTextAttribute as aG, FilterExpression as aH, FilterLogicGate as aI, FilterTernary as aJ, AggregationConfig as aK, GeometryFilter as aL, MultiAggregationConfig as aM, ValueConfiguration as aN, ElementGroupNode as aO, ElementNode as aP, FeatureNode as aQ, LayerGroupNode as aR, LayerNode as aS, FeltBoundary as aT, FeltZoom as aU, GeoJsonProperties as aV, LatLng as aW, LineStringGeometry as aX, LngLatTuple as aY, MultiLineStringGeometry as aZ, MultiPointGeometry as a_, NoteElementRead as aa, NoteElementUpdate as ab, PathElementCreate as ac, PathElementRead as ad, PathElementUpdate as ae, PlaceElementCreate as af, PlaceElementRead as ag, PlaceElementUpdate as ah, PolygonElementCreate as ai, PolygonElementRead as aj, PolygonElementUpdate as ak, TextElementCreate as al, TextElementRead as am, TextElementUpdate as an, DataOnlyLayer as ao, FeltTiledVectorSource as ap, GeoJsonDataVectorSource as aq, GeoJsonFileVectorSource as ar, GeoJsonUrlVectorSource as as, LayerCommon as at, LayerProcessingStatus as au, RasterBand as av, RasterLayer as aw, RasterLayerSource as ax, RasterValue as ay, VectorLayer as az, ElementGroup as b, PointGeometry as b0, PolygonGeometry as b1, SortDirection as b2, CircleToolSettings as b3, HighlighterToolSettings as b4, LineToolSettings as b5, MarkerToolSettings as b6, NoteToolSettings as b7, PinToolSettings as b8, PlaceFrame as b9, PlaceSymbol as ba, PolygonToolSettings as bb, RouteToolSettings as bc, TextToolSettings as bd, UnionToIntersection as be, PromiseOrNot as bf, GetElementGroupsConstraint as c, ElementChangeCallbackParams as d, ElementGroupChangeCallbackParams as e, ElementCreate as f, ElementUpdate as g, GetLayersConstraint as h, LayerChangeCallbackParams as i, LayerGroup as j, GetLayerGroupsConstraint as k, LayerGroupChangeCallbackParams as l, LegendItemIdentifier as m, LegendItem as n, LegendItemsConstraint as o, LegendItemChangeCallbackParams as p, LayerFilters as q, GetRenderedFeaturesConstraint as r, LayerFeature as s, GeoJsonFeature as t, GetLayerCategoriesParams as u, GetLayerCategoriesGroup as v, GetLayerHistogramParams as w, GetLayerHistogramBin as x, GetLayerCalculationParams as y, LayerSchema as z };