@mappable-world/mappable-types 1.0.16731241 → 1.0.16966980
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.
|
@@ -2,7 +2,7 @@ import type { WorldCoordinates } from "./coordinates";
|
|
|
2
2
|
import type { GenericGeometry } from "./geojson";
|
|
3
3
|
import type { PixelCoordinates } from "./coordinates";
|
|
4
4
|
import type { HotspotFeature } from "./hotspot";
|
|
5
|
-
type
|
|
5
|
+
type CustomizationStyler = {
|
|
6
6
|
zoom?: number | [
|
|
7
7
|
number,
|
|
8
8
|
number
|
|
@@ -17,19 +17,20 @@ type VectorCustomizationStyler = {
|
|
|
17
17
|
opacity?: number;
|
|
18
18
|
scale?: number;
|
|
19
19
|
};
|
|
20
|
-
type
|
|
21
|
-
type
|
|
22
|
-
type
|
|
20
|
+
type CustomizationTypes = 'point' | 'polyline' | 'polygon';
|
|
21
|
+
type CustomizationElements = 'geometry' | 'geometry.fill' | 'geometry.fill.pattern' | 'geometry.outline' | 'label' | 'label.icon' | 'label.text' | 'label.text.fill' | 'label.text.outline';
|
|
22
|
+
type CustomizationItem = {
|
|
23
23
|
tags?: {
|
|
24
24
|
all?: string | string[];
|
|
25
25
|
any?: string | string[];
|
|
26
26
|
none?: string | string[];
|
|
27
27
|
} | string;
|
|
28
|
-
types?:
|
|
29
|
-
elements?:
|
|
30
|
-
stylers?:
|
|
28
|
+
types?: CustomizationTypes | CustomizationTypes[];
|
|
29
|
+
elements?: CustomizationElements | CustomizationElements[];
|
|
30
|
+
stylers?: CustomizationStyler | CustomizationStyler[];
|
|
31
31
|
};
|
|
32
|
-
type
|
|
32
|
+
type CustomizationConfig = ReadonlyArray<CustomizationItem>;
|
|
33
|
+
type Customization = CustomizationConfig;
|
|
33
34
|
interface WorldHotspot {
|
|
34
35
|
readonly type: 'world';
|
|
35
36
|
readonly feature: HotspotFeature<unknown>;
|
|
@@ -150,10 +151,18 @@ interface VectorTileDataSourceDescription {
|
|
|
150
151
|
/** Milliseconds */
|
|
151
152
|
cameraIdleThrottling?: number;
|
|
152
153
|
richModelDecoderWorkerUrl?: string;
|
|
153
|
-
customization?:
|
|
154
|
+
customization?: Customization;
|
|
154
155
|
theme?: MapTheme;
|
|
155
156
|
hdModeEnabled?: boolean;
|
|
156
157
|
/** Defines how hotspots of type should be treated: enabled/disabled or use custom hotspots instead. */
|
|
157
158
|
hotspots?: Record<string, boolean | FetchHotspotsFunction | HotspotsOptions>;
|
|
158
159
|
}
|
|
159
|
-
|
|
160
|
+
/** @deprecated Use CustomizationTypes instead */
|
|
161
|
+
type VectorCustomizationTypes = CustomizationTypes;
|
|
162
|
+
/** @deprecated Use CustomizationElements instead */
|
|
163
|
+
type VectorCustomizationElements = CustomizationElements;
|
|
164
|
+
/** @deprecated Use CustomizationItem instead */
|
|
165
|
+
type VectorCustomizationItem = CustomizationItem;
|
|
166
|
+
/** @deprecated Use Customization instead */
|
|
167
|
+
type VectorCustomization = Customization;
|
|
168
|
+
export { VectorCustomizationTypes, VectorCustomizationElements, VectorCustomizationItem, VectorCustomization, CustomizationTypes, CustomizationElements, CustomizationItem, Customization, RasterTileDataSourceDescription, FetchHotspotsFunction, VectorTileDataSourceDescription, VectorTileSize, VectorObjectsCollisionPriority, VectorDataSourcePriority, VectorMapType, HotspotsOptions, FetchTileFunction, ComposeTileUrlFunction, Hotspot, WorldHotspot, RenderedHotspot, FetchedRasterTile, FetchedTile, FetchedCommonTile, MapTheme };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Customization } from "../../common/types";
|
|
2
2
|
import { MMapLayerProps } from "../MMapLayer";
|
|
3
3
|
import { MMapComplexEntity } from "../MMapEnities";
|
|
4
4
|
/**
|
|
@@ -21,8 +21,8 @@ type MMapDefaultSchemeLayerProps = {
|
|
|
21
21
|
* @deprecated use {@link MMapDefaultSchemeLayerProps}.layers instead
|
|
22
22
|
*/
|
|
23
23
|
visible?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
customization?:
|
|
24
|
+
/** Tiles customization. */
|
|
25
|
+
customization?: Customization;
|
|
26
26
|
/**
|
|
27
27
|
* Theme applied to the scheme
|
|
28
28
|
* @deprecated use {@link MMapProps}.theme prop in {@link MMap} instead
|