@kispace-io/gs-lib 0.0.0
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/README.md +58 -0
- package/bin/map-builder.js +132 -0
- package/dist/base-map-builder.d.ts +102 -0
- package/dist/base-map-builder.d.ts.map +1 -0
- package/dist/gs-gs2ol.d.ts +41 -0
- package/dist/gs-gs2ol.d.ts.map +1 -0
- package/dist/gs-lib.css +3724 -0
- package/dist/gs-lib.d.ts +16 -0
- package/dist/gs-lib.d.ts.map +1 -0
- package/dist/gs-litns.d.ts +32 -0
- package/dist/gs-litns.d.ts.map +1 -0
- package/dist/gs-model.d.ts +186 -0
- package/dist/gs-model.d.ts.map +1 -0
- package/dist/gs-ol-adapters.d.ts +23 -0
- package/dist/gs-ol-adapters.d.ts.map +1 -0
- package/dist/gs-ol2gs.d.ts +9 -0
- package/dist/gs-ol2gs.d.ts.map +1 -0
- package/dist/gs-olns.d.ts +22 -0
- package/dist/gs-olns.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.html +69 -0
- package/dist/index.js +104888 -0
- package/dist/index.js.map +1 -0
- package/dist/pwa/assets/icons/192x192.png +0 -0
- package/dist/pwa/assets/icons/24x24.png +0 -0
- package/dist/pwa/assets/icons/48x48.png +0 -0
- package/dist/pwa/assets/icons/512x512.png +0 -0
- package/dist/pwa/assets/icons/icon_192.png +0 -0
- package/dist/pwa/assets/icons/icon_24.png +0 -0
- package/dist/pwa/assets/icons/icon_48.png +0 -0
- package/dist/pwa/assets/icons/icon_512.png +0 -0
- package/dist/pwa/manifest.json +54 -0
- package/dist/pwa/staticwebapp.config.json +6 -0
- package/dist/pwa/sw.js +109 -0
- package/lib/node-map-builder.ts +200 -0
- package/package.json +51 -0
- package/public/index.html +69 -0
- package/public/pwa/assets/icons/192x192.png +0 -0
- package/public/pwa/assets/icons/24x24.png +0 -0
- package/public/pwa/assets/icons/48x48.png +0 -0
- package/public/pwa/assets/icons/512x512.png +0 -0
- package/public/pwa/assets/icons/icon_192.png +0 -0
- package/public/pwa/assets/icons/icon_24.png +0 -0
- package/public/pwa/assets/icons/icon_48.png +0 -0
- package/public/pwa/assets/icons/icon_512.png +0 -0
- package/public/pwa/manifest.json +54 -0
- package/public/pwa/staticwebapp.config.json +6 -0
- package/public/pwa/sw.js +109 -0
- package/src/base-map-builder.ts +414 -0
- package/src/gs-gs2ol.ts +626 -0
- package/src/gs-lib.ts +54 -0
- package/src/gs-litns.ts +213 -0
- package/src/gs-model.ts +393 -0
- package/src/gs-ol-adapters.ts +89 -0
- package/src/gs-ol2gs.ts +86 -0
- package/src/gs-olns.ts +30 -0
- package/src/index.ts +15 -0
- package/tsconfig.json +23 -0
package/dist/gs-lib.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Importer } from './gs-gs2ol';
|
|
2
|
+
import { GsMap } from './gs-model';
|
|
3
|
+
export * from './gs-model';
|
|
4
|
+
export * from './gs-gs2ol';
|
|
5
|
+
export interface GsAppOptions {
|
|
6
|
+
containerSelector: string | HTMLElement;
|
|
7
|
+
gsMap: GsMap;
|
|
8
|
+
env?: any;
|
|
9
|
+
modules?: any;
|
|
10
|
+
importer?: Importer;
|
|
11
|
+
mapOptions?: {
|
|
12
|
+
controls: any;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const gsLib: (options: GsAppOptions) => Promise<import('ol').Map>;
|
|
16
|
+
//# sourceMappingURL=gs-lib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs-lib.d.ts","sourceRoot":"","sources":["../src/gs-lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,WAAW,CAAC;AAInB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAE3B,MAAM,WAAW,YAAY;IACzB,iBAAiB,EAAE,MAAM,GAAG,WAAW,CAAC;IACxC,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE;QACT,QAAQ,EAAE,GAAG,CAAA;KAChB,CAAA;CACJ;AAED,eAAO,MAAM,KAAK,GAAU,SAAS,YAAY,8BAgChD,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { nothing, when } from '../../appspace/src/externals/lit-exports';
|
|
2
|
+
export * from '../../appspace/src/externals/lit-exports';
|
|
3
|
+
export declare const lit: {
|
|
4
|
+
html: (strings: TemplateStringsArray, ...values: unknown[]) => import('lit-html').TemplateResult<1>;
|
|
5
|
+
css: (strings: TemplateStringsArray, ...values: (import('lit').CSSResultGroup | number)[]) => import('lit').CSSResult;
|
|
6
|
+
unsafeCSS: (value: unknown) => import('lit').CSSResult;
|
|
7
|
+
svg: (strings: TemplateStringsArray, ...values: unknown[]) => import('lit-html').TemplateResult<2>;
|
|
8
|
+
nothing: symbol;
|
|
9
|
+
when: typeof when;
|
|
10
|
+
repeat: import('lit-html/directives/repeat.js').RepeatDirectiveFn;
|
|
11
|
+
keyed: (k: unknown, v: unknown) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/keyed.js').Keyed>;
|
|
12
|
+
classMap: (classInfo: import('lit-html/directives/class-map.js').ClassInfo) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/class-map.js').ClassMapDirective>;
|
|
13
|
+
styleMap: (styleInfo: Readonly<import('lit-html/directives/style-map.js').StyleInfo>) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/style-map.js').StyleMapDirective>;
|
|
14
|
+
ifDefined: <T>(value: T) => typeof nothing | NonNullable<T>;
|
|
15
|
+
guard: (_value: unknown, f: () => unknown) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/guard.js').GuardDirective>;
|
|
16
|
+
cache: (v: unknown) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/cache.js').CacheDirective>;
|
|
17
|
+
unsafeHTML: (value: string | typeof import('lit-html').noChange | typeof nothing | null | undefined) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/unsafe-html.js').UnsafeHTMLDirective>;
|
|
18
|
+
until: (...values: unknown[]) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/until.js').UntilDirective>;
|
|
19
|
+
live: (value: unknown) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/live.js').LiveDirective>;
|
|
20
|
+
ref: (_ref?: import('lit-html/directives/ref.js').RefOrCallback<Element> | undefined) => import('lit-html/directive.js').DirectiveResult<typeof import('lit-html/directives/ref.js').RefDirective>;
|
|
21
|
+
createRef: <T = Element>() => import('lit-html/directives/ref.js').Ref<T>;
|
|
22
|
+
defineComponent: (tagName: string, renderFn: (props: any) => any, options?: {
|
|
23
|
+
props?: Record<string, any> | Record<string, {
|
|
24
|
+
type?: any;
|
|
25
|
+
reflect?: boolean;
|
|
26
|
+
attribute?: string | boolean;
|
|
27
|
+
}>;
|
|
28
|
+
styles?: any;
|
|
29
|
+
shadowRootOptions?: ShadowRootInit;
|
|
30
|
+
}) => string;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=gs-litns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs-litns.d.ts","sourceRoot":"","sources":["../src/gs-litns.ts"],"names":[],"mappings":"AAKA,cAAc,4CAA4C,CAAC;AAG3D,OAAO,EACQ,OAAO,EAClB,IAAI,EAEP,MAAM,4CAA4C,CAAC;AAKpD,OAAO,2CAA2C,CAAC;AA8KnD,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;+BAxIH,MAAM,YACL,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,YACnB;QACN,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE;YAAE,IAAI,CAAC,EAAE,GAAG,CAAC;YAAC,OAAO,CAAC,EAAE,OAAO,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC,CAAC;QAC9G,MAAM,CAAC,EAAE,GAAG,CAAC;QACb,iBAAiB,CAAC,EAAE,cAAc,CAAC;KACtC,KACF,MAAM;CAqJR,CAAC"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
export declare const KEY_LABEL = "label";
|
|
2
|
+
export declare const KEY_NAME = "name";
|
|
3
|
+
export declare const KEY_URL = "url";
|
|
4
|
+
export declare const KEY_FORMAT = "format";
|
|
5
|
+
export declare const KEY_ICON_PATH = "iconPath";
|
|
6
|
+
export declare const KEY_STATE = "_state";
|
|
7
|
+
export declare const KEY_SRC = "src";
|
|
8
|
+
export declare const KEY_SOURCETYPE = "sourceType";
|
|
9
|
+
export declare const KEY_ENV = "_env";
|
|
10
|
+
export declare const KEY_GS_MANAGED = "gsManaged";
|
|
11
|
+
export declare const KEY_SETTINGS = "settings";
|
|
12
|
+
export declare const KEY_UUID = "uuid";
|
|
13
|
+
export declare const KEY_EVENT_SUBSCRIPTIONS = "_eventSubscriptions";
|
|
14
|
+
export declare const LAYER_GEOCODED_MARKERS = "geocoded-markers";
|
|
15
|
+
export interface GsBag {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export declare function ensureUuid<T extends GsState>(obj: T): T;
|
|
19
|
+
export declare function ensureUuidsRecursive<T extends GsState>(obj: T): T;
|
|
20
|
+
export interface GsState {
|
|
21
|
+
uuid?: string;
|
|
22
|
+
state?: GsBag;
|
|
23
|
+
}
|
|
24
|
+
export declare enum GsSourceType {
|
|
25
|
+
OSM = "OSM",
|
|
26
|
+
GeoJSON = "GeoJSON",
|
|
27
|
+
Features = "Features",
|
|
28
|
+
KML = "KML",
|
|
29
|
+
GeoTIFF = "GeoTIFF",
|
|
30
|
+
GPX = "GPX",
|
|
31
|
+
BM = "BM",
|
|
32
|
+
WMS = "WMS",
|
|
33
|
+
WMTS = "WMTS",
|
|
34
|
+
XYZ = "XYZ"
|
|
35
|
+
}
|
|
36
|
+
export declare enum GsLayerType {
|
|
37
|
+
TILE = "TILE",
|
|
38
|
+
VECTOR = "VECTOR",
|
|
39
|
+
GROUP = "GROUP"
|
|
40
|
+
}
|
|
41
|
+
export declare enum GsGeometryType {
|
|
42
|
+
Point = "Point",
|
|
43
|
+
MultiPoint = "MultiPoint",
|
|
44
|
+
Polygon = "Polygon",
|
|
45
|
+
MultiPolygon = "MultiPolygon",
|
|
46
|
+
LineString = "LineString",
|
|
47
|
+
MultiLineString = "MultiLineString",
|
|
48
|
+
Circle = "Circle",
|
|
49
|
+
LinearRing = "LinearRing"
|
|
50
|
+
}
|
|
51
|
+
export interface GsGeometry extends GsState {
|
|
52
|
+
type: GsGeometryType;
|
|
53
|
+
coordinates: number[];
|
|
54
|
+
}
|
|
55
|
+
export interface GsResource {
|
|
56
|
+
}
|
|
57
|
+
export interface GsIcon extends GsResource {
|
|
58
|
+
src: string;
|
|
59
|
+
}
|
|
60
|
+
export interface GsFeature extends GsState {
|
|
61
|
+
geometry: GsGeometry;
|
|
62
|
+
}
|
|
63
|
+
export interface GsSource extends GsState {
|
|
64
|
+
type: GsSourceType;
|
|
65
|
+
url?: string;
|
|
66
|
+
features?: GsFeature[];
|
|
67
|
+
}
|
|
68
|
+
export interface GsLayer extends GsState {
|
|
69
|
+
name?: string;
|
|
70
|
+
type: GsLayerType;
|
|
71
|
+
source: GsSource;
|
|
72
|
+
visible?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface GsScript extends GsState {
|
|
75
|
+
src: string;
|
|
76
|
+
}
|
|
77
|
+
export interface GsOverlay extends GsScript {
|
|
78
|
+
position: "bottom-left" | "bottom-center" | "bottom-right" | "center-left" | "center-center" | "center-right" | "top-left" | "top-center" | "top-right";
|
|
79
|
+
}
|
|
80
|
+
export interface GsControl extends GsScript {
|
|
81
|
+
}
|
|
82
|
+
export interface GsInteraction extends GsState {
|
|
83
|
+
}
|
|
84
|
+
export interface GsView extends GsState {
|
|
85
|
+
center: number[];
|
|
86
|
+
zoom: number;
|
|
87
|
+
projection: string;
|
|
88
|
+
}
|
|
89
|
+
export interface GsStrokeStyle {
|
|
90
|
+
color?: string;
|
|
91
|
+
width?: number;
|
|
92
|
+
lineDash?: number[];
|
|
93
|
+
lineCap?: 'butt' | 'round' | 'square';
|
|
94
|
+
lineJoin?: 'bevel' | 'round' | 'miter';
|
|
95
|
+
miterLimit?: number;
|
|
96
|
+
}
|
|
97
|
+
export interface GsFillStyle {
|
|
98
|
+
color?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface GsImageStyle {
|
|
101
|
+
type: 'circle' | 'icon' | 'regular-shape';
|
|
102
|
+
radius?: number;
|
|
103
|
+
fill?: GsFillStyle;
|
|
104
|
+
stroke?: GsStrokeStyle;
|
|
105
|
+
src?: string;
|
|
106
|
+
scale?: number;
|
|
107
|
+
anchor?: [number, number];
|
|
108
|
+
anchorXUnits?: 'fraction' | 'pixels';
|
|
109
|
+
anchorYUnits?: 'fraction' | 'pixels';
|
|
110
|
+
anchorOrigin?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
111
|
+
color?: string;
|
|
112
|
+
crossOrigin?: string;
|
|
113
|
+
offset?: [number, number];
|
|
114
|
+
offsetOrigin?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
115
|
+
size?: [number, number];
|
|
116
|
+
points?: number;
|
|
117
|
+
radius1?: number;
|
|
118
|
+
radius2?: number;
|
|
119
|
+
angle?: number;
|
|
120
|
+
opacity?: number;
|
|
121
|
+
rotation?: number;
|
|
122
|
+
rotateWithView?: boolean;
|
|
123
|
+
displacement?: [number, number];
|
|
124
|
+
}
|
|
125
|
+
export interface GsTextStyle {
|
|
126
|
+
text?: string;
|
|
127
|
+
font?: string;
|
|
128
|
+
maxAngle?: number;
|
|
129
|
+
offsetX?: number;
|
|
130
|
+
offsetY?: number;
|
|
131
|
+
overflow?: boolean;
|
|
132
|
+
placement?: 'point' | 'line';
|
|
133
|
+
repeat?: number;
|
|
134
|
+
scale?: number;
|
|
135
|
+
rotateWithView?: boolean;
|
|
136
|
+
rotation?: number;
|
|
137
|
+
textAlign?: 'left' | 'center' | 'right' | 'end' | 'start';
|
|
138
|
+
justify?: 'left' | 'center' | 'right';
|
|
139
|
+
textBaseline?: 'bottom' | 'top' | 'middle' | 'alphabetic' | 'hanging' | 'ideographic';
|
|
140
|
+
fill?: GsFillStyle;
|
|
141
|
+
stroke?: GsStrokeStyle;
|
|
142
|
+
backgroundFill?: GsFillStyle;
|
|
143
|
+
backgroundStroke?: GsStrokeStyle;
|
|
144
|
+
padding?: [number, number, number, number];
|
|
145
|
+
}
|
|
146
|
+
export interface GsStyle {
|
|
147
|
+
id?: string;
|
|
148
|
+
stroke?: GsStrokeStyle;
|
|
149
|
+
fill?: GsFillStyle;
|
|
150
|
+
image?: GsImageStyle;
|
|
151
|
+
text?: GsTextStyle;
|
|
152
|
+
zIndex?: number;
|
|
153
|
+
}
|
|
154
|
+
export interface GsStylesMap {
|
|
155
|
+
[key: string]: GsStyle;
|
|
156
|
+
}
|
|
157
|
+
export declare const DEFAULT_STYLES: GsStylesMap;
|
|
158
|
+
export interface GsStyleRule {
|
|
159
|
+
id?: string;
|
|
160
|
+
condition: {
|
|
161
|
+
geometryType?: GsGeometryType | GsGeometryType[];
|
|
162
|
+
layerName?: string;
|
|
163
|
+
property?: {
|
|
164
|
+
key: string;
|
|
165
|
+
value?: any;
|
|
166
|
+
operator?: 'equals' | 'not-equals' | 'contains' | 'greater-than' | 'less-than' | 'exists';
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
styleId: string;
|
|
170
|
+
priority?: number;
|
|
171
|
+
}
|
|
172
|
+
export declare function evaluateStyleRule(rule: GsStyleRule, feature: GsFeature, layerName?: string): boolean;
|
|
173
|
+
export declare function getStyleForFeature(feature: GsFeature, rules: GsStyleRule[], stylesMap: GsStylesMap, layerName?: string): GsStyle | undefined;
|
|
174
|
+
export interface GsMap extends GsState {
|
|
175
|
+
view: GsView;
|
|
176
|
+
layers: GsLayer[];
|
|
177
|
+
overlays: GsOverlay[];
|
|
178
|
+
controls: GsControl[];
|
|
179
|
+
interactions: GsInteraction[];
|
|
180
|
+
styles: GsStylesMap;
|
|
181
|
+
styleRules: GsStyleRule[];
|
|
182
|
+
chatHistory: any[];
|
|
183
|
+
}
|
|
184
|
+
export declare const DEFAULT_STYLE_RULES: GsStyleRule[];
|
|
185
|
+
export declare const DEFAULT_GSMAP: GsMap;
|
|
186
|
+
//# sourceMappingURL=gs-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs-model.d.ts","sourceRoot":"","sources":["../src/gs-model.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,eAAO,MAAM,UAAU,WAAW,CAAC;AACnC,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,eAAO,MAAM,cAAc,eAAe,CAAA;AAC1C,eAAO,MAAM,OAAO,SAAS,CAAA;AAC7B,eAAO,MAAM,cAAc,cAAc,CAAA;AACzC,eAAO,MAAM,YAAY,aAAa,CAAA;AACtC,eAAO,MAAM,QAAQ,SAAS,CAAA;AAC9B,eAAO,MAAM,uBAAuB,wBAAwB,CAAA;AAE5D,eAAO,MAAM,sBAAsB,qBAAqB,CAAA;AAExD,MAAM,WAAW,KAAK;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB;AAED,w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E,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CA4CpG;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAU5I;AAED,MAAM,WAAW,KAAM,SAAQ,OAAO;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,YAAY,EAAE,aAAa,EAAE,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,WAAW,EAAE,GAAG,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,mBAAmB,EAAE,WAAW,EAyB5C,CAAA;AAED,eAAO,MAAM,aAAa,OAkBf,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Map } from 'ol';
|
|
2
|
+
import { GsOlControl, GsOlOverlay } from './gs-gs2ol';
|
|
3
|
+
export declare class GsOlAdapter<T extends GsOlControl | GsOlOverlay> {
|
|
4
|
+
protected map: Map;
|
|
5
|
+
protected olObject: T;
|
|
6
|
+
private templateFunction?;
|
|
7
|
+
protected retargetSelector?: string;
|
|
8
|
+
constructor(olObject: T);
|
|
9
|
+
getMap(): any;
|
|
10
|
+
getElement(): HTMLElement;
|
|
11
|
+
render(strings?: TemplateStringsArray | Function): void;
|
|
12
|
+
protected onRendered(): void;
|
|
13
|
+
style(styleJson: any): void;
|
|
14
|
+
}
|
|
15
|
+
export declare class GsControlAdapter extends GsOlAdapter<GsOlControl> {
|
|
16
|
+
style(styleJson: any): void;
|
|
17
|
+
rendered(): void;
|
|
18
|
+
}
|
|
19
|
+
export declare class GsOverlayAdapter extends GsOlAdapter<GsOlOverlay> {
|
|
20
|
+
show(coords: number[]): void;
|
|
21
|
+
hide(): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=gs-ol-adapters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs-ol-adapters.d.ts","sourceRoot":"","sources":["../src/gs-ol-adapters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,IAAI,CAAC;AACvB,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAGpD,qBAAa,WAAW,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;IACxD,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IACnB,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEtB,OAAO,CAAC,gBAAgB,CAAC,CAAW;IACpC,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;gBAExB,QAAQ,EAAE,CAAC;IAKhB,MAAM,IAAI,GAAG;IAIb,UAAU;IAIV,MAAM,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,QAAQ;IAYvD,SAAS,CAAC,UAAU;IAGb,KAAK,CAAC,SAAS,EAAE,GAAG;CAO9B;AAED,qBAAa,gBAAiB,SAAQ,WAAW,CAAC,WAAW,CAAC;IACnD,KAAK,CAAC,SAAS,EAAE,GAAG;IAQpB,QAAQ;CAoBlB;AAED,qBAAa,gBAAiB,SAAQ,WAAW,CAAC,WAAW,CAAC;IACnD,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE;IAKrB,IAAI;CAGd"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Feature } from 'ol';
|
|
2
|
+
import { GsFeature, GsGeometry, GsLayerType, GsSourceType } from './gs-model';
|
|
3
|
+
import * as olGeom from "ol/geom";
|
|
4
|
+
export declare const toGsLayerType: (tag: string) => GsLayerType;
|
|
5
|
+
export declare const toGsSourceType: (tag: string) => GsSourceType;
|
|
6
|
+
export declare const toSourceUrl: (sourceType: GsSourceType) => "https://sgx.geodatenzentrum.de/gdz_basemapworld_vektor/styles/bm_web_wld_col.json" | undefined;
|
|
7
|
+
export declare function toGsGeometry(geometry: olGeom.SimpleGeometry): GsGeometry;
|
|
8
|
+
export declare function toGsFeature(feature: Feature): GsFeature;
|
|
9
|
+
//# sourceMappingURL=gs-ol2gs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs-ol2gs.d.ts","sourceRoot":"","sources":["../src/gs-ol2gs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,IAAI,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,EACH,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EAIf,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,gBAgBxC,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,iBAUzC,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,YAAY,YAAY,oGAMnD,CAAA;AAuBD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,cAAc,GAAG,UAAU,CAKxE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,aAI3C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenLayers library re-exports
|
|
3
|
+
* Centralized re-exports for OpenLayers to provide a single source of truth.
|
|
4
|
+
*/
|
|
5
|
+
export * from 'ol';
|
|
6
|
+
export type { FeatureLike } from 'ol/Feature';
|
|
7
|
+
export * as geom from 'ol/geom';
|
|
8
|
+
export * as layer from 'ol/layer';
|
|
9
|
+
export * as source from 'ol/source';
|
|
10
|
+
export * as style from 'ol/style';
|
|
11
|
+
export * as format from 'ol/format';
|
|
12
|
+
export * as interaction from 'ol/interaction';
|
|
13
|
+
export * as proj from 'ol/proj';
|
|
14
|
+
export * as sphere from 'ol/sphere';
|
|
15
|
+
export * as extent from 'ol/extent';
|
|
16
|
+
export * as events from 'ol/events';
|
|
17
|
+
export * as eventsCondition from 'ol/events/condition';
|
|
18
|
+
export { default as BaseLayer } from 'ol/layer/Base';
|
|
19
|
+
export { apply as applyMapboxStyle } from 'ol-mapbox-style';
|
|
20
|
+
export { defaults as defaultControls } from 'ol/control/defaults';
|
|
21
|
+
export { defaults as defaultInteractions } from 'ol/interaction/defaults';
|
|
22
|
+
//# sourceMappingURL=gs-olns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs-olns.d.ts","sourceRoot":"","sources":["../src/gs-olns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAa,IAAI,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,eAAe,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,QAAQ,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './gs-model';
|
|
2
|
+
export * from './gs-gs2ol';
|
|
3
|
+
export * from './gs-ol2gs';
|
|
4
|
+
export * from './gs-ol-adapters';
|
|
5
|
+
export * from './gs-lib';
|
|
6
|
+
export * from './gs-olns';
|
|
7
|
+
export { buildMap, generateAppJs, processServiceWorker, processManifest, processHtml, bundleApp, type BuildOptions, type FileSystem, type GsLibFileCopier, type ProgressCallback } from './base-map-builder';
|
|
8
|
+
export declare const rtUtils: {
|
|
9
|
+
resolveUrl(url: string): Promise<string>;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AAExB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,oBAAoB,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE5M,eAAO,MAAM,OAAO;oBACM,MAAM;CAG/B,CAAC"}
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en" translate="no">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8"/>
|
|
5
|
+
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
6
|
+
<meta name="google" content="notranslate">
|
|
7
|
+
|
|
8
|
+
<meta name="mobile-web-app-capable" content="yes">
|
|
9
|
+
<meta name="apple-mobile-web-app-title" content="geospace-app" />
|
|
10
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
|
11
|
+
|
|
12
|
+
<link rel="icon" href="/assets/icons/icon_24.png" type="image/png" />
|
|
13
|
+
<link rel="manifest" href="manifest.json" />
|
|
14
|
+
|
|
15
|
+
<title>$TITLE</title>
|
|
16
|
+
<link rel="stylesheet" href="app.css" />
|
|
17
|
+
<style>
|
|
18
|
+
html, body, .map-container {
|
|
19
|
+
height: 100dvh;
|
|
20
|
+
width: 100dvw;
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.no-touch {
|
|
27
|
+
touch-action: none;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
30
|
+
</head>
|
|
31
|
+
<body>
|
|
32
|
+
<div class="map-container"></div>
|
|
33
|
+
<script type="module">
|
|
34
|
+
import {renderMap} from "./app.js"
|
|
35
|
+
renderMap("div.map-container")
|
|
36
|
+
</script>
|
|
37
|
+
<script>
|
|
38
|
+
if ('serviceWorker' in navigator) {
|
|
39
|
+
window.onload = () => {
|
|
40
|
+
navigator.serviceWorker.register('/sw.js').then(registration => {
|
|
41
|
+
// Check for updates
|
|
42
|
+
registration.addEventListener('updatefound', () => {
|
|
43
|
+
const newWorker = registration.installing;
|
|
44
|
+
if (newWorker) {
|
|
45
|
+
newWorker.addEventListener('statechange', () => {
|
|
46
|
+
if (newWorker.state === 'installed' && navigator.serviceWorker.controller) {
|
|
47
|
+
// New version available
|
|
48
|
+
if (confirm('A new version of the app is available. Reload to update?')) {
|
|
49
|
+
newWorker.postMessage({ type: 'SKIP_WAITING' });
|
|
50
|
+
window.location.reload();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// Listen for service worker messages
|
|
58
|
+
navigator.serviceWorker.addEventListener('message', event => {
|
|
59
|
+
if (event.data && event.data.type === 'RELOAD') {
|
|
60
|
+
window.location.reload();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
</body>
|
|
68
|
+
</html>
|
|
69
|
+
|