@geospatial-sdk/core 0.0.5-dev.37 → 0.0.5-dev.39

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.
@@ -1,6 +1,7 @@
1
1
  import { EndpointError } from "@camptocamp/ogc-client";
2
2
  import { Feature } from "geojson";
3
3
  import BaseEvent from "ol/events/Event";
4
+ import { Extent } from "ol/extent";
4
5
  export declare const FeaturesClickEventType = "features-click";
5
6
  export interface FeaturesClickEvent {
6
7
  type: typeof FeaturesClickEventType;
@@ -16,11 +17,10 @@ export interface MapClickEvent {
16
17
  type: typeof MapClickEventType;
17
18
  coordinate: [number, number];
18
19
  }
19
- export interface MapEventsByType {
20
- [FeaturesClickEventType]: FeaturesClickEvent;
21
- [FeaturesHoverEventType]: FeaturesHoverEvent;
22
- [MapClickEventType]: MapClickEvent;
23
- [SourceLoadErrorType]: SourceLoadErrorEvent;
20
+ export declare const MapExtentChangeEventType = "map-extent-change";
21
+ export interface MapExtentChangeEvent {
22
+ type: typeof MapExtentChangeEventType;
23
+ extent: Extent;
24
24
  }
25
25
  export declare const SourceLoadErrorType = "source-load-error";
26
26
  export declare class SourceLoadErrorEvent extends BaseEvent {
@@ -28,4 +28,11 @@ export declare class SourceLoadErrorEvent extends BaseEvent {
28
28
  httpStatus?: number;
29
29
  constructor(error: EndpointError | Error | Response);
30
30
  }
31
+ export interface MapEventsByType {
32
+ [FeaturesClickEventType]: FeaturesClickEvent;
33
+ [FeaturesHoverEventType]: FeaturesHoverEvent;
34
+ [MapClickEventType]: MapClickEvent;
35
+ [MapExtentChangeEventType]: MapExtentChangeEvent;
36
+ [SourceLoadErrorType]: SourceLoadErrorEvent;
37
+ }
31
38
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../lib/model/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,E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AAsB,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,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAC5D,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,wBAAwB,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AACvD,qBAAa,oBAAqB,SAAQ,SAAS;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;gBACR,KAAK,EAAE,aAAa,GAAG,KAAK,GAAG,QAAQ;CAiBpD;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;IACnC,CAAC,wBAAwB,CAAC,EAAE,oBAAoB,CAAC;IACjD,CAAC,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;CAC7C"}
@@ -2,6 +2,7 @@ import BaseEvent from "ol/events/Event";
2
2
  export const FeaturesClickEventType = "features-click";
3
3
  export const FeaturesHoverEventType = "features-hover";
4
4
  export const MapClickEventType = "map-click";
5
+ export const MapExtentChangeEventType = "map-extent-change";
5
6
  export const SourceLoadErrorType = "source-load-error";
6
7
  export class SourceLoadErrorEvent extends BaseEvent {
7
8
  constructor(error) {
@@ -1,6 +1,7 @@
1
1
  import { EndpointError } from "@camptocamp/ogc-client";
2
2
  import { Feature } from "geojson";
3
3
  import BaseEvent from "ol/events/Event";
4
+ import { Extent } from "ol/extent";
4
5
 
5
6
  export const FeaturesClickEventType = "features-click";
6
7
  export interface FeaturesClickEvent {
@@ -20,11 +21,10 @@ export interface MapClickEvent {
20
21
  coordinate: [number, number]; // expressed in lon/lat
21
22
  }
22
23
 
23
- export interface MapEventsByType {
24
- [FeaturesClickEventType]: FeaturesClickEvent;
25
- [FeaturesHoverEventType]: FeaturesHoverEvent;
26
- [MapClickEventType]: MapClickEvent;
27
- [SourceLoadErrorType]: SourceLoadErrorEvent;
24
+ export const MapExtentChangeEventType = "map-extent-change";
25
+ export interface MapExtentChangeEvent {
26
+ type: typeof MapExtentChangeEventType;
27
+ extent: Extent;
28
28
  }
29
29
 
30
30
  export const SourceLoadErrorType = "source-load-error";
@@ -49,3 +49,11 @@ export class SourceLoadErrorEvent extends BaseEvent {
49
49
  }
50
50
  }
51
51
  }
52
+
53
+ export interface MapEventsByType {
54
+ [FeaturesClickEventType]: FeaturesClickEvent;
55
+ [FeaturesHoverEventType]: FeaturesHoverEvent;
56
+ [MapClickEventType]: MapClickEvent;
57
+ [MapExtentChangeEventType]: MapExtentChangeEvent;
58
+ [SourceLoadErrorType]: SourceLoadErrorEvent;
59
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geospatial-sdk/core",
3
- "version": "0.0.5-dev.37+37e2f64",
3
+ "version": "0.0.5-dev.39+73c8269",
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": "37e2f6473cd5d45ebf1e53259d1d00729df66bec",
25
+ "gitHead": "73c8269f35d9aeab065101cdb29762c497076270",
26
26
  "dependencies": {
27
27
  "proj4": "^2.9.2"
28
28
  },