@geospatial-sdk/core 0.0.5-dev.16 → 0.0.5-dev.18

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.
@@ -0,0 +1,22 @@
1
+ import { Feature } from "geojson";
2
+ export declare const FeaturesClickEventType = "features-click";
3
+ export interface FeaturesClickEvent {
4
+ type: typeof FeaturesClickEventType;
5
+ features: Feature[];
6
+ }
7
+ export declare const FeaturesHoverEventType = "features-hover";
8
+ export interface FeaturesHoverEvent {
9
+ type: typeof FeaturesHoverEventType;
10
+ features: Feature[];
11
+ }
12
+ export declare const MapClickEventType = "map-click";
13
+ export interface MapClickEvent {
14
+ type: typeof MapClickEventType;
15
+ coordinate: [number, number];
16
+ }
17
+ export interface MapEventsByType {
18
+ [FeaturesClickEventType]: FeaturesClickEvent;
19
+ [FeaturesHoverEventType]: FeaturesHoverEvent;
20
+ [MapClickEventType]: MapClickEvent;
21
+ }
22
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../lib/model/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,sBAAsB,CAAC;IACpC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,sBAAsB,CAAC;IACpC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,iBAAiB,CAAC;IAC/B,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC;IAC7C,CAAC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC;IAC7C,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC;CACpC"}
@@ -0,0 +1,3 @@
1
+ export const FeaturesClickEventType = "features-click";
2
+ export const FeaturesHoverEventType = "features-hover";
3
+ export const MapClickEventType = "map-click";
@@ -1,3 +1,4 @@
1
1
  export * from "./map-context";
2
2
  export * from "./map-context-diff";
3
+ export * from "./events";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./map-context";
2
2
  export * from "./map-context-diff";
3
+ export * from "./events";
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../lib/utils/view.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,eAAe,EAGf,cAAc,EAEf,MAAM,UAAU,CAAC;AAKlB,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAYhC"}
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../lib/utils/view.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,eAAe,EAIf,cAAc,EAEf,MAAM,UAAU,CAAC;AAKlB,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAYhC"}
@@ -0,0 +1,25 @@
1
+ import { Feature } from "geojson";
2
+
3
+ export const FeaturesClickEventType = "features-click";
4
+ export interface FeaturesClickEvent {
5
+ type: typeof FeaturesClickEventType;
6
+ features: Feature[];
7
+ }
8
+
9
+ export const FeaturesHoverEventType = "features-hover";
10
+ export interface FeaturesHoverEvent {
11
+ type: typeof FeaturesHoverEventType;
12
+ features: Feature[];
13
+ }
14
+
15
+ export const MapClickEventType = "map-click";
16
+ export interface MapClickEvent {
17
+ type: typeof MapClickEventType;
18
+ coordinate: [number, number]; // expressed in lon/lat
19
+ }
20
+
21
+ export interface MapEventsByType {
22
+ [FeaturesClickEventType]: FeaturesClickEvent;
23
+ [FeaturesHoverEventType]: FeaturesHoverEvent;
24
+ [MapClickEventType]: MapClickEvent;
25
+ }
@@ -1,2 +1,3 @@
1
1
  export * from "./map-context";
2
2
  export * from "./map-context-diff";
3
+ export * from "./events";
package/lib/utils/view.ts CHANGED
@@ -9,6 +9,7 @@ import proj4 from "proj4";
9
9
  import {
10
10
  Extent,
11
11
  MapContextLayer,
12
+ MapContextLayerWfs,
12
13
  MapContextLayerWms,
13
14
  MapContextLayerWmts,
14
15
  MapContextView,
@@ -94,7 +95,9 @@ async function getWmtsLayerExtent(
94
95
  : null;
95
96
  }
96
97
 
97
- async function getWfsLayerExtent(layer: any): Promise<ViewByExtent | null> {
98
+ async function getWfsLayerExtent(
99
+ layer: MapContextLayerWfs,
100
+ ): Promise<ViewByExtent | null> {
98
101
  const endpoint = await new WfsEndpoint(layer.url).isReady();
99
102
  const featureTypeSummary = endpoint.getFeatureTypeSummary(layer.featureType);
100
103
  const boundingBox = featureTypeSummary?.boundingBox;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geospatial-sdk/core",
3
- "version": "0.0.5-dev.16+4001375",
3
+ "version": "0.0.5-dev.18+6f12b0b",
4
4
  "description": "Core functions and models for the SDK",
5
5
  "author": "Olivia <olivia.guyot@camptocamp.com>",
6
6
  "homepage": "",
@@ -22,7 +22,7 @@
22
22
  "test": "vitest",
23
23
  "build": "tsc"
24
24
  },
25
- "gitHead": "400137529b7bf0df095702ce7b899e0d51634c91",
25
+ "gitHead": "6f12b0b59e2794a24b27940c9c62dd279e2120e8",
26
26
  "dependencies": {
27
27
  "@camptocamp/ogc-client": "1.1.1-dev.9671ef4",
28
28
  "proj4": "^2.9.2"