@smart-factor/gem-ui-map-component 0.0.27 → 0.0.29
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/dist/{MapButtons-Dv9ONWN-.js → MapButtons-Cw7wmxyb.js} +19007 -18411
- package/dist/api/services/generated/api.d.ts +31 -0
- package/dist/components/Layers/Layers.styles.d.ts +4 -0
- package/dist/components/Map/Map.d.ts +1 -1
- package/dist/components/Map/config.d.ts +2 -1
- package/dist/components/Map/types.d.ts +3 -1
- package/dist/components/MapButtons/index.js +1 -1
- package/dist/components/MapPopups/RoadValidationErrorModal/RoadValidationErrorModal.d.ts +1 -0
- package/dist/components/MapPopups/RoadValidationErrorModal/types.d.ts +4 -0
- package/dist/components/MapPopups/styles.d.ts +1 -1
- package/dist/components/MapSidebar/MapSidebar.style.d.ts +3 -3
- package/dist/components/SnapConfigBar/SnapConfigBar.styles.d.ts +1 -1
- package/dist/contexts/MapInteractionsContext/types.d.ts +0 -1
- package/dist/hooks/useSetupMap.d.ts +1 -1
- package/dist/main.js +2973 -3361
- package/dist/services/Layers/LayersService.d.ts +1 -0
- package/dist/services/Layers/layerIconUtils.d.ts +2 -0
- package/dist/services/Map/MapService.d.ts +4 -4
- package/dist/services/Map/labels.d.ts +6 -0
- package/dist/services/Map/types.d.ts +28 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { Style } from 'ol/style';
|
|
|
9
9
|
import { Geometry as GeometryApi } from '../../api/services/generated/api';
|
|
10
10
|
import { GEMRoadNetDetails, GeometryEvents, ItemPositionResponse, MapEvents, SnapEvents, VectorLayerType } from '../../components/Map/types';
|
|
11
11
|
import { TypedEventEmitter } from '../EventEmitter';
|
|
12
|
-
import { GEMFeature, GEMLayerConfig, GEMVectorLayer, GroupedWMSLayer, QueryMapItemsPayload, StyleDefinition, WMSLayer, WMSLayerConfig } from './types';
|
|
12
|
+
import { GEMFeature, GEMLayerConfig, GEMVectorLayer, GroupedWMSLayer, LabelStyle, QueryMapItemsPayload, StyleDefinition, WMSLayer, WMSLayerConfig } from './types';
|
|
13
13
|
declare class MapService {
|
|
14
14
|
projectionConst: {
|
|
15
15
|
EPSG_2180: string;
|
|
@@ -39,12 +39,12 @@ declare class MapService {
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
createFeatures(featureList: GEMFeature[], style: StyleDefinition, image: GEMVectorLayer['image'], layerSymbol: string): Feature<GeometryOl>[];
|
|
43
|
-
createFeature(feature: GEMFeature, style: StyleDefinition, image: GEMVectorLayer['image'], layerSymbol: string, imageScale?: number | null): Feature<GeometryOl>;
|
|
42
|
+
createFeatures(featureList: GEMFeature[], style: StyleDefinition, image: GEMVectorLayer['image'], layerSymbol: string, labelStyle?: LabelStyle): Feature<GeometryOl>[];
|
|
43
|
+
createFeature(feature: GEMFeature, style: StyleDefinition, image: GEMVectorLayer['image'], layerSymbol: string, imageScale?: number | null, labelStyle?: LabelStyle): Feature<GeometryOl>;
|
|
44
44
|
createLayer(style?: StyleDefinition): VectorLayer<VectorSource<Feature<GeometryOl>>, Feature<GeometryOl>>;
|
|
45
45
|
createVectorLayer(layer: GEMVectorLayer, type: string, imageScale: number, config?: GEMLayerConfig | WMSLayerConfig): VectorLayer<VectorSource<Feature<GeometryOl>>, Feature<GeometryOl>>;
|
|
46
46
|
groupWMSServices(layers: WMSLayer[]): GroupedWMSLayer[];
|
|
47
|
-
processStyle(styleDefinition: StyleDefinition, imageSrc: string | null): Style | Style[];
|
|
47
|
+
processStyle(styleDefinition: StyleDefinition, imageSrc: string | null, label?: LabelStyle, text?: string | null): Style | Style[];
|
|
48
48
|
queryNetsByRoadId(roadId: number): Promise<import('axios').AxiosResponse<{
|
|
49
49
|
response: GEMRoadNetDetails[];
|
|
50
50
|
}, any>>;
|
|
@@ -48,13 +48,41 @@ export type GEMLayerConfig = {
|
|
|
48
48
|
use_cors: boolean;
|
|
49
49
|
version: string | null;
|
|
50
50
|
visible_for_rlo: boolean;
|
|
51
|
+
image?: string;
|
|
52
|
+
styleDef?: string;
|
|
53
|
+
topology?: boolean;
|
|
51
54
|
};
|
|
52
55
|
export type GEMVectorLayer = {
|
|
53
56
|
image: string | null;
|
|
54
57
|
items: GEMFeature[];
|
|
55
58
|
layer_style: StyleDefinition;
|
|
56
59
|
layer_symbol: string;
|
|
60
|
+
label_style?: LabelStyle;
|
|
57
61
|
};
|
|
62
|
+
interface LabelStroke {
|
|
63
|
+
color: string;
|
|
64
|
+
width: number;
|
|
65
|
+
}
|
|
66
|
+
export interface LabelStyle {
|
|
67
|
+
fill: string;
|
|
68
|
+
stroke: LabelStroke;
|
|
69
|
+
font: LabelFont;
|
|
70
|
+
size: string;
|
|
71
|
+
type: LabelType;
|
|
72
|
+
weight: LabelWeight;
|
|
73
|
+
textBaseline: 'middle';
|
|
74
|
+
textAlign: 'center';
|
|
75
|
+
placement: 'point';
|
|
76
|
+
overflow: true;
|
|
77
|
+
}
|
|
78
|
+
export interface LabelAttribute {
|
|
79
|
+
attribute: number;
|
|
80
|
+
separator: string;
|
|
81
|
+
[key: string]: string | number;
|
|
82
|
+
}
|
|
83
|
+
type LabelFont = 'ARIAL' | 'COURIER_NEW' | 'OPEN_SANS' | 'VERDANA';
|
|
84
|
+
export type LabelType = 'HIDE' | 'SHORTEN' | 'NORMAL' | 'WRAP';
|
|
85
|
+
type LabelWeight = 'NORMAL' | 'BOLD';
|
|
58
86
|
export type StyleDefinition = {
|
|
59
87
|
fill: string;
|
|
60
88
|
radius: string;
|