jmapcloud-ng-core-types 1.0.50 → 1.0.52
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/index.ts +1 -0
- package/package.json +1 -1
- package/public/core.d.ts +23 -0
- package/public/jmap/features.d.ts +6 -0
package/index.ts
CHANGED
|
@@ -151,6 +151,7 @@ export interface JFeatureService {
|
|
|
151
151
|
getByIds(layerId: JId, featureIds: JId[]): Promise<GeoJSON.Feature[]>
|
|
152
152
|
getByLayerId(layerId: JId, bbox: JBoundaryBox): Promise<GeoJSON.Feature[]>
|
|
153
153
|
geometryUpdateById(params: JFeatureGeometryUpdateParams): Promise<GeoJSON.Feature>
|
|
154
|
+
propertiesUpdateById(params: JFeaturePropertiesUpdateParams): Promise<GeoJSON.Feature>
|
|
154
155
|
deleteById(layerId: JId, featureId: JId): Promise<JId>
|
|
155
156
|
// deleteByIds(layerId: JId, featureIds: JId[]): Promise<JFeatureDeleteByIdsResult>
|
|
156
157
|
// TODO: see if the future endpoint will return detail about individual deleted features success or failure
|
package/package.json
CHANGED
package/public/core.d.ts
CHANGED
|
@@ -524,6 +524,29 @@ declare namespace JMap {
|
|
|
524
524
|
*/
|
|
525
525
|
function geometryUpdateById(params: JFeatureGeometryUpdateParams): Promise<GeoJSON.Feature>
|
|
526
526
|
|
|
527
|
+
/**
|
|
528
|
+
* **JMap.Feature.propertiesUpdateById**
|
|
529
|
+
*
|
|
530
|
+
* Change the feature properties for the given layer id, feature id and properties.
|
|
531
|
+
*
|
|
532
|
+
* @param params contains the JMap layer id, the JMap feature id and its properties
|
|
533
|
+
* @throws if layer or feature not found, or if properties are invalid
|
|
534
|
+
* @example
|
|
535
|
+
* ```ts
|
|
536
|
+
* const newProperties = { ... }
|
|
537
|
+
* // change the properties of feature id="4" on layer id="3"
|
|
538
|
+
* JMap.Feature
|
|
539
|
+
* .propertiesUpdateById({
|
|
540
|
+
* layerId: 3,
|
|
541
|
+
* featureId: 4,
|
|
542
|
+
* properties: newProperties
|
|
543
|
+
* })
|
|
544
|
+
* .then(feature => console.info("Feature properties' have been changed", feature))
|
|
545
|
+
* .catch(error => console.error("An error occured", error))
|
|
546
|
+
* ```
|
|
547
|
+
*/
|
|
548
|
+
function propertiesUpdateById(params: JFeaturePropertiesUpdateParams): Promise<GeoJSON.Feature>
|
|
549
|
+
|
|
527
550
|
/**
|
|
528
551
|
* **JMap.Feature.deleteById**
|
|
529
552
|
*
|
|
@@ -9,6 +9,12 @@ declare interface JFeatureGeometryUpdateParams {
|
|
|
9
9
|
properties?: JAttributeValueByName
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
declare interface JFeaturePropertiesUpdateParams {
|
|
13
|
+
layerId: JId
|
|
14
|
+
featureId: JId
|
|
15
|
+
properties: JAttributeValueByName
|
|
16
|
+
}
|
|
17
|
+
|
|
12
18
|
declare interface JFeatureEventGeometryUpdateParams {
|
|
13
19
|
layerId: JId
|
|
14
20
|
updatedFeature: GeoJSON.Feature
|