Skip to content

Commit 7ecb79d

Browse files
committed
Return coords when reading a place
1 parent d4ef70f commit 7ecb79d

File tree

4 files changed

+114
-108
lines changed

4 files changed

+114
-108
lines changed

.changeset/small-buckets-turn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@feltmaps/js-sdk": minor
33
---
44

5-
Add coordinates to circle
5+
Return coordinates on Circle and Place elements as they are only a single point.

docs/Elements/PlaceElementRead.md

+6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050
5151
***
5252

53+
## coordinates
54+
55+
> **coordinates**: \[`number`, `number`] = `PointGeometrySchema.shape.coordinates`
56+
57+
***
58+
5359
## symbol
5460

5561
> **symbol**: `string`

etc/js-sdk.api.md

+106-106
Original file line numberDiff line numberDiff line change
@@ -4,112 +4,112 @@
44
55
```ts
66

7-
import { ao as AggregationConfig } from './types-CQwkpLq-.js';
8-
import { A as AggregationMethod } from './types-CQwkpLq-.js';
9-
import { Q as CircleElementCreate } from './types-CQwkpLq-.js';
10-
import { R as CircleElementRead } from './types-CQwkpLq-.js';
11-
import { U as CircleElementUpdate } from './types-CQwkpLq-.js';
12-
import { aF as CircleToolSettings } from './types-CQwkpLq-.js';
13-
import { C as ConfigurableToolType } from './types-CQwkpLq-.js';
14-
import { E as Element_2 } from './types-CQwkpLq-.js';
15-
import { d as ElementChangeCallbackParams } from './types-CQwkpLq-.js';
16-
import { f as ElementCreate } from './types-CQwkpLq-.js';
17-
import { b as ElementGroup } from './types-CQwkpLq-.js';
18-
import { e as ElementGroupChangeCallbackParams } from './types-CQwkpLq-.js';
19-
import { ar as ElementGroupNode } from './types-CQwkpLq-.js';
20-
import { as as ElementNode } from './types-CQwkpLq-.js';
21-
import { g as ElementUpdate } from './types-CQwkpLq-.js';
22-
import { z as EntityNode } from './types-CQwkpLq-.js';
23-
import { s as Feature } from './types-CQwkpLq-.js';
24-
import { at as FeatureNode } from './types-CQwkpLq-.js';
25-
import { B as FeatureSelection } from './types-CQwkpLq-.js';
26-
import { aw as FeltBoundary } from './types-CQwkpLq-.js';
27-
import { ax as FeltZoom } from './types-CQwkpLq-.js';
28-
import { al as FilterExpression } from './types-CQwkpLq-.js';
29-
import { am as FilterLogicGate } from './types-CQwkpLq-.js';
30-
import { F as Filters } from './types-CQwkpLq-.js';
31-
import { an as FilterTernary } from './types-CQwkpLq-.js';
32-
import { G as Geometry } from './types-CQwkpLq-.js';
33-
import { c as GetElementGroupsConstraint } from './types-CQwkpLq-.js';
34-
import { a as GetElementsConstraint } from './types-CQwkpLq-.js';
35-
import { x as GetLayerCalculationParams } from './types-CQwkpLq-.js';
36-
import { u as GetLayerCategoriesGroup } from './types-CQwkpLq-.js';
37-
import { t as GetLayerCategoriesParams } from './types-CQwkpLq-.js';
38-
import { k as GetLayerGroupsConstraint } from './types-CQwkpLq-.js';
39-
import { w as GetLayerHistogramBin } from './types-CQwkpLq-.js';
40-
import { v as GetLayerHistogramParams } from './types-CQwkpLq-.js';
41-
import { h as GetLayersConstraint } from './types-CQwkpLq-.js';
42-
import { r as GetRenderedFeaturesConstraint } from './types-CQwkpLq-.js';
43-
import { W as HighlighterElementCreate } from './types-CQwkpLq-.js';
44-
import { X as HighlighterElementRead } from './types-CQwkpLq-.js';
45-
import { Y as HighlighterElementUpdate } from './types-CQwkpLq-.js';
46-
import { aG as HighlighterToolSettings } from './types-CQwkpLq-.js';
47-
import { Z as ImageElementCreate } from './types-CQwkpLq-.js';
48-
import { _ as ImageElementRead } from './types-CQwkpLq-.js';
49-
import { $ as ImageElementUpdate } from './types-CQwkpLq-.js';
50-
import { I as InputToolSettings } from './types-CQwkpLq-.js';
51-
import { J } from './types-CQwkpLq-.js';
52-
import { ay as LatLng } from './types-CQwkpLq-.js';
53-
import { L as Layer } from './types-CQwkpLq-.js';
54-
import { i as LayerChangeCallbackParams } from './types-CQwkpLq-.js';
55-
import { q as LayerFilters } from './types-CQwkpLq-.js';
56-
import { j as LayerGroup } from './types-CQwkpLq-.js';
57-
import { l as LayerGroupChangeCallbackParams } from './types-CQwkpLq-.js';
58-
import { au as LayerGroupNode } from './types-CQwkpLq-.js';
59-
import { av as LayerNode } from './types-CQwkpLq-.js';
60-
import { aj as LayerProcessingStatus } from './types-CQwkpLq-.js';
61-
import { n as LegendItem } from './types-CQwkpLq-.js';
62-
import { p as LegendItemChangeCallbackParams } from './types-CQwkpLq-.js';
63-
import { m as LegendItemIdentifier } from './types-CQwkpLq-.js';
64-
import { o as LegendItemsConstraint } from './types-CQwkpLq-.js';
65-
import { az as LineStringGeometry } from './types-CQwkpLq-.js';
66-
import { aH as LineToolSettings } from './types-CQwkpLq-.js';
67-
import { a0 as LinkElementRead } from './types-CQwkpLq-.js';
68-
import { aA as LngLatTuple } from './types-CQwkpLq-.js';
69-
import { y as MapDetails } from './types-CQwkpLq-.js';
70-
import { M as MapInteractionEvent } from './types-CQwkpLq-.js';
71-
import { a1 as MarkerElementCreate } from './types-CQwkpLq-.js';
72-
import { a2 as MarkerElementRead } from './types-CQwkpLq-.js';
73-
import { a3 as MarkerElementUpdate } from './types-CQwkpLq-.js';
74-
import { aI as MarkerToolSettings } from './types-CQwkpLq-.js';
75-
import { ap as MultiAggregationConfig } from './types-CQwkpLq-.js';
76-
import { aB as MultiLineStringGeometry } from './types-CQwkpLq-.js';
77-
import { aC as MultiPolygonGeometry } from './types-CQwkpLq-.js';
78-
import { a4 as NoteElementCreate } from './types-CQwkpLq-.js';
79-
import { a5 as NoteElementRead } from './types-CQwkpLq-.js';
80-
import { a6 as NoteElementUpdate } from './types-CQwkpLq-.js';
81-
import { aJ as NoteToolSettings } from './types-CQwkpLq-.js';
82-
import { a7 as PathElementCreate } from './types-CQwkpLq-.js';
83-
import { a8 as PathElementRead } from './types-CQwkpLq-.js';
84-
import { a9 as PathElementUpdate } from './types-CQwkpLq-.js';
85-
import { aK as PinToolSettings } from './types-CQwkpLq-.js';
86-
import { aa as PlaceElementCreate } from './types-CQwkpLq-.js';
87-
import { ab as PlaceElementRead } from './types-CQwkpLq-.js';
88-
import { ac as PlaceElementUpdate } from './types-CQwkpLq-.js';
89-
import { aL as PlaceFrame } from './types-CQwkpLq-.js';
90-
import { aM as PlaceSymbol } from './types-CQwkpLq-.js';
91-
import { aD as PointGeometry } from './types-CQwkpLq-.js';
92-
import { ad as PolygonElementCreate } from './types-CQwkpLq-.js';
93-
import { ae as PolygonElementRead } from './types-CQwkpLq-.js';
94-
import { af as PolygonElementUpdate } from './types-CQwkpLq-.js';
95-
import { aE as PolygonGeometry } from './types-CQwkpLq-.js';
96-
import { aN as PolygonToolSettings } from './types-CQwkpLq-.js';
97-
import { ak as RasterValue } from './types-CQwkpLq-.js';
98-
import { aO as RouteToolSettings } from './types-CQwkpLq-.js';
99-
import { K as SetViewportCenterZoomParams } from './types-CQwkpLq-.js';
100-
import { S as SetVisibilityRequest } from './types-CQwkpLq-.js';
101-
import { ag as TextElementCreate } from './types-CQwkpLq-.js';
102-
import { ah as TextElementRead } from './types-CQwkpLq-.js';
103-
import { ai as TextElementUpdate } from './types-CQwkpLq-.js';
104-
import { aP as TextToolSettings } from './types-CQwkpLq-.js';
105-
import { H as ToolSettingsChangeEvent } from './types-CQwkpLq-.js';
106-
import { D as ToolSettingsMap } from './types-CQwkpLq-.js';
107-
import { T as ToolType } from './types-CQwkpLq-.js';
108-
import { aq as ValueConfiguration } from './types-CQwkpLq-.js';
109-
import { P as ViewportCenterZoom } from './types-CQwkpLq-.js';
110-
import { N as ViewportConstraints } from './types-CQwkpLq-.js';
111-
import { O as ViewportFitBoundsParams } from './types-CQwkpLq-.js';
112-
import { V as ViewportState } from './types-CQwkpLq-.js';
7+
import { ao as AggregationConfig } from './types-C0bwQTbn.js';
8+
import { A as AggregationMethod } from './types-C0bwQTbn.js';
9+
import { Q as CircleElementCreate } from './types-C0bwQTbn.js';
10+
import { R as CircleElementRead } from './types-C0bwQTbn.js';
11+
import { U as CircleElementUpdate } from './types-C0bwQTbn.js';
12+
import { aF as CircleToolSettings } from './types-C0bwQTbn.js';
13+
import { C as ConfigurableToolType } from './types-C0bwQTbn.js';
14+
import { E as Element_2 } from './types-C0bwQTbn.js';
15+
import { d as ElementChangeCallbackParams } from './types-C0bwQTbn.js';
16+
import { f as ElementCreate } from './types-C0bwQTbn.js';
17+
import { b as ElementGroup } from './types-C0bwQTbn.js';
18+
import { e as ElementGroupChangeCallbackParams } from './types-C0bwQTbn.js';
19+
import { ar as ElementGroupNode } from './types-C0bwQTbn.js';
20+
import { as as ElementNode } from './types-C0bwQTbn.js';
21+
import { g as ElementUpdate } from './types-C0bwQTbn.js';
22+
import { z as EntityNode } from './types-C0bwQTbn.js';
23+
import { s as Feature } from './types-C0bwQTbn.js';
24+
import { at as FeatureNode } from './types-C0bwQTbn.js';
25+
import { B as FeatureSelection } from './types-C0bwQTbn.js';
26+
import { aw as FeltBoundary } from './types-C0bwQTbn.js';
27+
import { ax as FeltZoom } from './types-C0bwQTbn.js';
28+
import { al as FilterExpression } from './types-C0bwQTbn.js';
29+
import { am as FilterLogicGate } from './types-C0bwQTbn.js';
30+
import { F as Filters } from './types-C0bwQTbn.js';
31+
import { an as FilterTernary } from './types-C0bwQTbn.js';
32+
import { G as Geometry } from './types-C0bwQTbn.js';
33+
import { c as GetElementGroupsConstraint } from './types-C0bwQTbn.js';
34+
import { a as GetElementsConstraint } from './types-C0bwQTbn.js';
35+
import { x as GetLayerCalculationParams } from './types-C0bwQTbn.js';
36+
import { u as GetLayerCategoriesGroup } from './types-C0bwQTbn.js';
37+
import { t as GetLayerCategoriesParams } from './types-C0bwQTbn.js';
38+
import { k as GetLayerGroupsConstraint } from './types-C0bwQTbn.js';
39+
import { w as GetLayerHistogramBin } from './types-C0bwQTbn.js';
40+
import { v as GetLayerHistogramParams } from './types-C0bwQTbn.js';
41+
import { h as GetLayersConstraint } from './types-C0bwQTbn.js';
42+
import { r as GetRenderedFeaturesConstraint } from './types-C0bwQTbn.js';
43+
import { W as HighlighterElementCreate } from './types-C0bwQTbn.js';
44+
import { X as HighlighterElementRead } from './types-C0bwQTbn.js';
45+
import { Y as HighlighterElementUpdate } from './types-C0bwQTbn.js';
46+
import { aG as HighlighterToolSettings } from './types-C0bwQTbn.js';
47+
import { Z as ImageElementCreate } from './types-C0bwQTbn.js';
48+
import { _ as ImageElementRead } from './types-C0bwQTbn.js';
49+
import { $ as ImageElementUpdate } from './types-C0bwQTbn.js';
50+
import { I as InputToolSettings } from './types-C0bwQTbn.js';
51+
import { J } from './types-C0bwQTbn.js';
52+
import { ay as LatLng } from './types-C0bwQTbn.js';
53+
import { L as Layer } from './types-C0bwQTbn.js';
54+
import { i as LayerChangeCallbackParams } from './types-C0bwQTbn.js';
55+
import { q as LayerFilters } from './types-C0bwQTbn.js';
56+
import { j as LayerGroup } from './types-C0bwQTbn.js';
57+
import { l as LayerGroupChangeCallbackParams } from './types-C0bwQTbn.js';
58+
import { au as LayerGroupNode } from './types-C0bwQTbn.js';
59+
import { av as LayerNode } from './types-C0bwQTbn.js';
60+
import { aj as LayerProcessingStatus } from './types-C0bwQTbn.js';
61+
import { n as LegendItem } from './types-C0bwQTbn.js';
62+
import { p as LegendItemChangeCallbackParams } from './types-C0bwQTbn.js';
63+
import { m as LegendItemIdentifier } from './types-C0bwQTbn.js';
64+
import { o as LegendItemsConstraint } from './types-C0bwQTbn.js';
65+
import { az as LineStringGeometry } from './types-C0bwQTbn.js';
66+
import { aH as LineToolSettings } from './types-C0bwQTbn.js';
67+
import { a0 as LinkElementRead } from './types-C0bwQTbn.js';
68+
import { aA as LngLatTuple } from './types-C0bwQTbn.js';
69+
import { y as MapDetails } from './types-C0bwQTbn.js';
70+
import { M as MapInteractionEvent } from './types-C0bwQTbn.js';
71+
import { a1 as MarkerElementCreate } from './types-C0bwQTbn.js';
72+
import { a2 as MarkerElementRead } from './types-C0bwQTbn.js';
73+
import { a3 as MarkerElementUpdate } from './types-C0bwQTbn.js';
74+
import { aI as MarkerToolSettings } from './types-C0bwQTbn.js';
75+
import { ap as MultiAggregationConfig } from './types-C0bwQTbn.js';
76+
import { aB as MultiLineStringGeometry } from './types-C0bwQTbn.js';
77+
import { aC as MultiPolygonGeometry } from './types-C0bwQTbn.js';
78+
import { a4 as NoteElementCreate } from './types-C0bwQTbn.js';
79+
import { a5 as NoteElementRead } from './types-C0bwQTbn.js';
80+
import { a6 as NoteElementUpdate } from './types-C0bwQTbn.js';
81+
import { aJ as NoteToolSettings } from './types-C0bwQTbn.js';
82+
import { a7 as PathElementCreate } from './types-C0bwQTbn.js';
83+
import { a8 as PathElementRead } from './types-C0bwQTbn.js';
84+
import { a9 as PathElementUpdate } from './types-C0bwQTbn.js';
85+
import { aK as PinToolSettings } from './types-C0bwQTbn.js';
86+
import { aa as PlaceElementCreate } from './types-C0bwQTbn.js';
87+
import { ab as PlaceElementRead } from './types-C0bwQTbn.js';
88+
import { ac as PlaceElementUpdate } from './types-C0bwQTbn.js';
89+
import { aL as PlaceFrame } from './types-C0bwQTbn.js';
90+
import { aM as PlaceSymbol } from './types-C0bwQTbn.js';
91+
import { aD as PointGeometry } from './types-C0bwQTbn.js';
92+
import { ad as PolygonElementCreate } from './types-C0bwQTbn.js';
93+
import { ae as PolygonElementRead } from './types-C0bwQTbn.js';
94+
import { af as PolygonElementUpdate } from './types-C0bwQTbn.js';
95+
import { aE as PolygonGeometry } from './types-C0bwQTbn.js';
96+
import { aN as PolygonToolSettings } from './types-C0bwQTbn.js';
97+
import { ak as RasterValue } from './types-C0bwQTbn.js';
98+
import { aO as RouteToolSettings } from './types-C0bwQTbn.js';
99+
import { K as SetViewportCenterZoomParams } from './types-C0bwQTbn.js';
100+
import { S as SetVisibilityRequest } from './types-C0bwQTbn.js';
101+
import { ag as TextElementCreate } from './types-C0bwQTbn.js';
102+
import { ah as TextElementRead } from './types-C0bwQTbn.js';
103+
import { ai as TextElementUpdate } from './types-C0bwQTbn.js';
104+
import { aP as TextToolSettings } from './types-C0bwQTbn.js';
105+
import { H as ToolSettingsChangeEvent } from './types-C0bwQTbn.js';
106+
import { D as ToolSettingsMap } from './types-C0bwQTbn.js';
107+
import { T as ToolType } from './types-C0bwQTbn.js';
108+
import { aq as ValueConfiguration } from './types-C0bwQTbn.js';
109+
import { P as ViewportCenterZoom } from './types-C0bwQTbn.js';
110+
import { N as ViewportConstraints } from './types-C0bwQTbn.js';
111+
import { O as ViewportFitBoundsParams } from './types-C0bwQTbn.js';
112+
import { V as ViewportState } from './types-C0bwQTbn.js';
113113
import { z } from 'zod';
114114

115115
export { AggregationConfig }

src/modules/elements/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export const ElementCreateSchema = z.discriminatedUnion("type", [
189189
NoteCreateSchema,
190190
]);
191191

192-
const PlaceReadSchema = PlaceElementSchema.omit({ coordinates: true });
192+
const PlaceReadSchema = PlaceElementSchema;
193193
const PathReadSchema = PathElementSchema.omit({ coordinates: true });
194194
const PolygonReadSchema = PolygonElementSchema.omit({
195195
coordinates: true,

0 commit comments

Comments
 (0)