@opengeoweb/webmap 2.0.1 → 2.1.3
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/lib/components/WMDrawMarker.d.ts +1 -1
- package/lib/components/WMGetServiceFromStore.d.ts +1 -1
- package/lib/components/WMJSMap.d.ts +1 -2
- package/lib/components/WMJSService.d.ts +6 -7
- package/lib/components/WMLayer.d.ts +6 -12
- package/package.json +1 -1
- package/webmap.esm.js +139 -140
- package/webmap.umd.js +128 -136
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const WMDrawMarker: (context: CanvasRenderingContext2D, coordx: number, coordy: number, fillColor?: string
|
|
1
|
+
declare const WMDrawMarker: (context: CanvasRenderingContext2D, coordx: number, coordy: number, fillColor?: string) => void;
|
|
2
2
|
export default WMDrawMarker;
|
|
@@ -15,6 +15,7 @@ export default class WMJSMap {
|
|
|
15
15
|
mapPin: MapPin;
|
|
16
16
|
mapdimensions: WMJSDimension[];
|
|
17
17
|
stopAnimating: () => void;
|
|
18
|
+
showLayerInfo: boolean;
|
|
18
19
|
isAnimating: boolean;
|
|
19
20
|
animationDelay: number;
|
|
20
21
|
animationList: any;
|
|
@@ -108,13 +109,11 @@ export default class WMJSMap {
|
|
|
108
109
|
private proj4;
|
|
109
110
|
private previousMouseButtonState;
|
|
110
111
|
private longlat;
|
|
111
|
-
xml2jsonrequest: string;
|
|
112
112
|
private tileRenderSettings;
|
|
113
113
|
private drawPending;
|
|
114
114
|
private needsRedraw;
|
|
115
115
|
private buildLayerDimsBusy;
|
|
116
116
|
constructor(_element: HTMLElement);
|
|
117
|
-
setXML2JSONURL(_xml2jsonrequest: string): void;
|
|
118
117
|
setWMTileRendererTileSettings(_WMTileRendererTileSettings: unknown): void;
|
|
119
118
|
/**
|
|
120
119
|
* Function which make a component ID which is unique over several WebMapJS instances
|
|
@@ -13,7 +13,7 @@ export declare const getWMSUrl: (service?: string, additionalParams?: {}) => str
|
|
|
13
13
|
/**
|
|
14
14
|
* Global getcapabilities function
|
|
15
15
|
*/
|
|
16
|
-
export declare const WMJSGetCapabilities: (service: string, succes: (param: any) => void, fail: (param: string) => void,
|
|
16
|
+
export declare const WMJSGetCapabilities: (service: string, succes: (param: any) => void, fail: (param: string) => void, options: {
|
|
17
17
|
headers?: any;
|
|
18
18
|
}, disableCache?: boolean) => void;
|
|
19
19
|
interface NodeObject {
|
|
@@ -22,6 +22,8 @@ interface NodeObject {
|
|
|
22
22
|
name?: string;
|
|
23
23
|
path?: string;
|
|
24
24
|
children?: [];
|
|
25
|
+
keywords?: string[];
|
|
26
|
+
abstract?: string;
|
|
25
27
|
}
|
|
26
28
|
export declare const sortByKey: (array: NodeObject[], key: string) => NodeObject[];
|
|
27
29
|
export declare const recursivelyFindLayer: (layers: any[], rootNode: any[], path: string) => void;
|
|
@@ -30,7 +32,6 @@ export declare const recursivelyFindLayer: (layers: any[], rootNode: any[], path
|
|
|
30
32
|
*
|
|
31
33
|
* options:
|
|
32
34
|
* service
|
|
33
|
-
* xml2jsonrequestURL
|
|
34
35
|
* title (optional)
|
|
35
36
|
*/
|
|
36
37
|
export declare class WMJSService {
|
|
@@ -42,13 +43,11 @@ export declare class WMJSService {
|
|
|
42
43
|
getcapabilitiesDoc: GetCapabilitiesJson;
|
|
43
44
|
busy: boolean;
|
|
44
45
|
_flatLayerObject: any[];
|
|
45
|
-
xml2jsonrequestURL: string;
|
|
46
46
|
functionCallbackList: any[];
|
|
47
47
|
_options: any;
|
|
48
48
|
nodeCache: any;
|
|
49
49
|
constructor(options: {
|
|
50
50
|
service: string;
|
|
51
|
-
xml2jsonrequestURL: string;
|
|
52
51
|
title?: string;
|
|
53
52
|
});
|
|
54
53
|
checkVersion111(jsonData: GetCapabilitiesJson): void;
|
|
@@ -62,16 +61,16 @@ export declare class WMJSService {
|
|
|
62
61
|
* @param succescallback Function called upon succes, cannot be left blank
|
|
63
62
|
* @param failcallback Function called upon failure, cannot be left blank
|
|
64
63
|
*/
|
|
65
|
-
getCapabilities(succescallback: (param: GetCapabilitiesJson) => void, failcallback: (param: unknown) => void, forceReload: boolean,
|
|
64
|
+
getCapabilities(succescallback: (param: GetCapabilitiesJson) => void, failcallback: (param: unknown) => void, forceReload: boolean, options: unknown): void;
|
|
66
65
|
checkException(jsonData: GetCapabilitiesJson): string | undefined;
|
|
67
66
|
/**
|
|
68
67
|
* Calls succes with a hierarchical node structure
|
|
69
68
|
* Calls failure with a string when someting goes wrong
|
|
70
69
|
*/
|
|
71
|
-
getNodes(succes: (param: unknown) => void, failure: (param: unknown) => void, forceReload: boolean,
|
|
70
|
+
getNodes(succes: (param: unknown) => void, failure: (param: unknown) => void, forceReload: boolean, options?: unknown): void;
|
|
72
71
|
/** Calls succes with an array of all layerobjects
|
|
73
72
|
* Calls failure when something goes wrong
|
|
74
73
|
*/
|
|
75
|
-
getLayerObjectsFlat(succes: (param: unknown) => void, failure: (param: unknown) => void, forceReload: boolean,
|
|
74
|
+
getLayerObjectsFlat(succes: (param: unknown) => void, failure: (param: unknown) => void, forceReload: boolean, options?: any): void;
|
|
76
75
|
}
|
|
77
76
|
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/// <reference types="node" />
|
|
3
2
|
import type WMJSMap from './WMJSMap';
|
|
4
3
|
import WMJSDimension from './WMJSDimension';
|
|
5
4
|
import WMProjection from './WMProjection';
|
|
6
|
-
import
|
|
7
|
-
import { GetCapabilitiesJson, WMJSService } from './WMJSService';
|
|
5
|
+
import { GetCapabilitiesJson } from './WMJSService';
|
|
8
6
|
import { Style, Dimension } from './types';
|
|
9
7
|
export declare enum LayerType {
|
|
10
8
|
mapLayer = "mapLayer",
|
|
@@ -29,11 +27,12 @@ export interface LayerOptions {
|
|
|
29
27
|
transparent?: boolean;
|
|
30
28
|
onReady?: (param: any) => void;
|
|
31
29
|
type?: string;
|
|
32
|
-
|
|
30
|
+
parentMap?: WMJSMap;
|
|
33
31
|
dimensions?: Dimension[];
|
|
34
32
|
headers?: Headers[];
|
|
35
33
|
failure?: (layer: WMLayer, message: string) => void;
|
|
36
34
|
ReactWMJSLayerId?: string;
|
|
35
|
+
onLayerError?: (layer: WMLayer, error: Error, webmapInstance: WMJSMap) => void;
|
|
37
36
|
}
|
|
38
37
|
/**
|
|
39
38
|
* This interface is for reading from the WMS GetCapabilties document, which can have different structures for V1.1.1 and V1.3.0
|
|
@@ -72,7 +71,6 @@ export default class WMLayer {
|
|
|
72
71
|
id: string;
|
|
73
72
|
name?: string;
|
|
74
73
|
ReactWMJSLayerId?: string;
|
|
75
|
-
reactWebMapJSLayer?: React.ReactElement;
|
|
76
74
|
hasError?: boolean;
|
|
77
75
|
enabled?: boolean;
|
|
78
76
|
lastError?: string;
|
|
@@ -82,7 +80,6 @@ export default class WMLayer {
|
|
|
82
80
|
service: string;
|
|
83
81
|
layerType: LayerType;
|
|
84
82
|
currentStyle?: string;
|
|
85
|
-
image?: WMImage;
|
|
86
83
|
linkedInfo: {
|
|
87
84
|
layer: string;
|
|
88
85
|
message: string;
|
|
@@ -90,7 +87,6 @@ export default class WMLayer {
|
|
|
90
87
|
headers: Headers[];
|
|
91
88
|
autoupdate: boolean;
|
|
92
89
|
timer: NodeJS.Timeout;
|
|
93
|
-
WMJSService: WMJSService;
|
|
94
90
|
getmapURL: string;
|
|
95
91
|
getfeatureinfoURL: string;
|
|
96
92
|
getlegendgraphicURL: string;
|
|
@@ -106,9 +102,8 @@ export default class WMLayer {
|
|
|
106
102
|
projectionProperties: WMProjection[];
|
|
107
103
|
queryable: boolean;
|
|
108
104
|
styles: Style[];
|
|
109
|
-
getCapabilitiesDoc: GetCapabilitiesJson;
|
|
110
105
|
serviceTitle: string;
|
|
111
|
-
|
|
106
|
+
parentMap: WMJSMap;
|
|
112
107
|
sldURL: string;
|
|
113
108
|
active: boolean;
|
|
114
109
|
getgraphinfoURL: string;
|
|
@@ -120,7 +115,6 @@ export default class WMLayer {
|
|
|
120
115
|
url: string;
|
|
121
116
|
colorscalerange: Record<string, unknown>[];
|
|
122
117
|
};
|
|
123
|
-
jsonlayer: this;
|
|
124
118
|
isConfigured: boolean;
|
|
125
119
|
init(): void;
|
|
126
120
|
constructor(options?: LayerOptions);
|
|
@@ -137,13 +131,13 @@ export default class WMLayer {
|
|
|
137
131
|
handleReferenceTime(name: string, value: string, updateMapDimensions?: boolean): void;
|
|
138
132
|
getDimensions(): WMJSDimension[];
|
|
139
133
|
setDimension(name: string, value: string, updateMapDimensions?: boolean): void;
|
|
140
|
-
__parseGetCapForLayer(
|
|
134
|
+
__parseGetCapForLayer(getcapabilitiesjson: GetCapabilitiesJson, layerDoneCallback: (layer: WMLayer) => void, fail: (layer: WMLayer, message: string) => void): void;
|
|
141
135
|
/**
|
|
142
136
|
* Calls success with a configured layer object
|
|
143
137
|
* Calls options.failure with error message.
|
|
144
138
|
* Throws string exceptions when someting goes wrong
|
|
145
139
|
*/
|
|
146
|
-
parseLayer(_layerDoneCallback: (layer: WMLayer) => void, forceReload: boolean
|
|
140
|
+
parseLayer(_layerDoneCallback: (layer: WMLayer) => void, forceReload: boolean): void;
|
|
147
141
|
/**
|
|
148
142
|
* A Promise to parse the layer, it will fetch the WMS GetCapabilities document, configure the layer and resolve to a WMLayer object
|
|
149
143
|
* @param forceReload Do not use the cache of the WMS GetCapabilties document, but instead fetch new data from the server
|