solid-map-gl 1.13.0 → 2.0.1
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 +157 -30
- package/dist/index.d.ts +489 -0
- package/dist/index.js +11 -0
- package/dist/index.jsx +2320 -0
- package/package.json +51 -35
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/styles.css +0 -1
- package/dist/source/components/Atmosphere/index.jsx +0 -13
- package/dist/source/components/Camera/index.jsx +0 -108
- package/dist/source/components/Control/index.jsx +0 -33
- package/dist/source/components/Draw/drawingStyles.jsx +0 -225
- package/dist/source/components/Draw/index.jsx +0 -52
- package/dist/source/components/Draw/modes/line_string.js +0 -43
- package/dist/source/components/Draw/modes/measurements.js +0 -76
- package/dist/source/components/Draw/modes/multi_point.js +0 -37
- package/dist/source/components/Draw/modes/point.js +0 -25
- package/dist/source/components/Draw/modes/polygon.js +0 -25
- package/dist/source/components/Draw/modes/radius.js +0 -138
- package/dist/source/components/Draw/modes/rectangle.js +0 -118
- package/dist/source/components/Draw/modes/rectangle_assisted.js +0 -233
- package/dist/source/components/Image/index.jsx +0 -135
- package/dist/source/components/Layer/index.jsx +0 -125
- package/dist/source/components/Layer3D/index.jsx +0 -330
- package/dist/source/components/Light/index.jsx +0 -10
- package/dist/source/components/MapGL/index.jsx +0 -273
- package/dist/source/components/MapProvider/index.jsx +0 -9
- package/dist/source/components/Marker/index.jsx +0 -57
- package/dist/source/components/Popup/index.jsx +0 -38
- package/dist/source/components/Source/index.jsx +0 -89
- package/dist/source/components/Terrain/index.jsx +0 -30
- package/dist/source/events.js +0 -78
- package/dist/source/index.jsx +0 -14
- package/dist/source/mapStyles.js +0 -116
- package/dist/source/styles.js +0 -62
- package/dist/types/components/Atmosphere/index.d.ts +0 -8
- package/dist/types/components/Camera/index.d.ts +0 -54
- package/dist/types/components/Control/index.d.ts +0 -15
- package/dist/types/components/Draw/drawingStyles.d.ts +0 -20
- package/dist/types/components/Draw/index.d.ts +0 -16
- package/dist/types/components/Draw/modes/line_string.d.ts +0 -2
- package/dist/types/components/Draw/modes/multi_point.d.ts +0 -2
- package/dist/types/components/Draw/modes/point.d.ts +0 -2
- package/dist/types/components/Draw/modes/polygon.d.ts +0 -2
- package/dist/types/components/Draw/modes/radius.d.ts +0 -2
- package/dist/types/components/Draw/modes/rectangle.d.ts +0 -2
- package/dist/types/components/Draw/modes/rectangle_assisted.d.ts +0 -18
- package/dist/types/components/Image/index.d.ts +0 -28
- package/dist/types/components/Layer/index.d.ts +0 -32
- package/dist/types/components/Layer3D/index.d.ts +0 -22
- package/dist/types/components/Light/index.d.ts +0 -8
- package/dist/types/components/MapGL/index.d.ts +0 -96
- package/dist/types/components/MapProvider/index.d.ts +0 -11
- package/dist/types/components/Marker/index.d.ts +0 -28
- package/dist/types/components/Popup/index.d.ts +0 -18
- package/dist/types/components/Source/index.d.ts +0 -13
- package/dist/types/components/Terrain/index.d.ts +0 -7
- package/dist/types/events.d.ts +0 -103
- package/dist/types/index.d.ts +0 -16
- package/dist/types/mapStyles.d.ts +0 -2
- package/dist/types/styles.d.ts +0 -2
package/dist/source/mapStyles.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
const mapBase = 'mapbox://styles/mapbox';
|
|
2
|
-
const gitBase = 'https://raw.githubusercontent.com/';
|
|
3
|
-
const gishub = 'https://raw.githubusercontent.com/GIShub4/map-styles/main/';
|
|
4
|
-
const hereBase = 'https://assets.vector.hereapi.com/styles/';
|
|
5
|
-
export const vectorStyleList = {
|
|
6
|
-
mb: {
|
|
7
|
-
standard: `${mapBase}/standard`,
|
|
8
|
-
light: `${mapBase}/light-v11`,
|
|
9
|
-
dark: `${mapBase}/dark-v11`,
|
|
10
|
-
street: `${mapBase}/streets-v12`,
|
|
11
|
-
outdoor: `${mapBase}/outdoors-v12`,
|
|
12
|
-
sat: `${mapBase}/satellite-v9`,
|
|
13
|
-
sat_street: `${mapBase}/satellite-streets-v12`,
|
|
14
|
-
nav_base: `${mapBase}/navigation-guidance-day-v4`,
|
|
15
|
-
nav_base_night: `${mapBase}/navigation-guidance-night-v4`,
|
|
16
|
-
nav: `${mapBase}/navigation-day-v1`,
|
|
17
|
-
nav_night: `${mapBase}/navigation-night-v1`,
|
|
18
|
-
basic: `${mapBase}/cjf4m44iw0uza2spb3q0a7s41`,
|
|
19
|
-
monochrome: `${mapBase}/cjv6rzz4j3m4b1fqcchuxclhb`,
|
|
20
|
-
leshine: `${mapBase}/cjcunv5ae262f2sm9tfwg8i0w`,
|
|
21
|
-
icecream: `${mapBase}/cj7t3i5yj0unt2rmt3y4b5e32`,
|
|
22
|
-
cali: `${mapBase}/cjerxnqt3cgvp2rmyuxbeqme7`,
|
|
23
|
-
northstar: `${mapBase}/cj44mfrt20f082snokim4ungi`,
|
|
24
|
-
mineral: `${mapBase}/cjtep62gq54l21frr1whf27ak`,
|
|
25
|
-
moonlight: `${mapBase}/cj3kbeqzo00022smj7akz3o1e`,
|
|
26
|
-
frank: `${mapBase}-map-design/ckshxkppe0gge18nz20i0nrwq`,
|
|
27
|
-
minimo: `${mapBase}-map-design/cksjc2nsq1bg117pnekb655h1`,
|
|
28
|
-
decimal: `${mapBase}-map-design/ck4014y110wt61ctt07egsel6`,
|
|
29
|
-
stand: `${mapBase}-map-design/ckr0svm3922ki18qntevm857n`,
|
|
30
|
-
blueprint: `${mapBase}-map-design/cks97e1e37nsd17nzg7p0308g`,
|
|
31
|
-
bubble: `${mapBase}-map-design/cksysy2nl62zp17quosctdtcc`,
|
|
32
|
-
pencil: `${mapBase}-map-design/cks9iema71es417mlrft4go2k`,
|
|
33
|
-
swiss_ski: `${gitBase}mapbox/mapbox-gl-swiss-ski-style/master/cij1zoclj002y8rkkdjl69psd.json`,
|
|
34
|
-
vintage: `${gitBase}mapbox/mapbox-gl-vintage-style/master/cif5p01n202nisaktvljx9mv3.json`,
|
|
35
|
-
whaam: `${gitBase}mapbox/mapbox-gl-whaam-style/master/cii8323c8004w0nlvtss3dbm2.json`,
|
|
36
|
-
neon: `${gitBase}NatEvatt/awesome-mapbox-gl-styles/master/styles/Neon/style.json`,
|
|
37
|
-
camoflauge: `${gitBase}jingsam/mapbox-gl-styles/master/Camouflage.json`,
|
|
38
|
-
emerald: `${gitBase}jingsam/mapbox-gl-styles/master/Emerald.json`,
|
|
39
|
-
runner: `${gitBase}jingsam/mapbox-gl-styles/master/Runner.json`,
|
|
40
|
-
x_ray: `${gitBase}jingsam/mapbox-gl-styles/master/X-ray.json`,
|
|
41
|
-
},
|
|
42
|
-
here: {
|
|
43
|
-
base: `${hereBase}berlin/base/mapbox/tilezen?apikey={apikey}`,
|
|
44
|
-
day: `${hereBase}berlin/day/mapbox/tilezen?apikey={apikey}`,
|
|
45
|
-
night: `${hereBase}berlin/night/mapbox/tilezen?apikey={apikey}`,
|
|
46
|
-
},
|
|
47
|
-
esri: {
|
|
48
|
-
blueprint: `${gishub}esri:blueprint.json`,
|
|
49
|
-
charted_territory: `${gishub}esri:charted-territory.json`,
|
|
50
|
-
colored_pencil: `${gishub}esri:colored-pencil.json`,
|
|
51
|
-
community: `${gishub}esri:community.json`,
|
|
52
|
-
mid_century: `${gishub}esri:mid-century.json`,
|
|
53
|
-
modern_antique: `${gishub}esri:modern-antique.json`,
|
|
54
|
-
nat_geo: `${gishub}esri:national-geographic.json`,
|
|
55
|
-
newspaper: `${gishub}esri:newspaper.json`,
|
|
56
|
-
open_street_map: `${gishub}esri:open-street-map.json`,
|
|
57
|
-
light_gray_canvas: `${gishub}esri:light-gray-canvas.json`,
|
|
58
|
-
dark_gray_canvas: `${gishub}esri:dark-gray-canvas.json`,
|
|
59
|
-
human_geo_light: `${gishub}esri:human-geography-light.json`,
|
|
60
|
-
human_geo_dark: `${gishub}esri:human-geography-dark.json`,
|
|
61
|
-
world_navigation: `${gishub}esri:world-navigation.json`,
|
|
62
|
-
world_street: `${gishub}esri:world-street.json`,
|
|
63
|
-
world_street_night: `${gishub}esri:world-street-night.json`,
|
|
64
|
-
world_terrain: `${gishub}esri:world-terrain.json`,
|
|
65
|
-
world_terrain_hybrid: `${gishub}esri:world-terrain-hybrid.json`,
|
|
66
|
-
world_topographic: `${gishub}esri:world-topographic.json`,
|
|
67
|
-
chromium: `${gishub}esri:chromium.json`,
|
|
68
|
-
dreamcatcher: `${gishub}esri:dreamcatcher.json`,
|
|
69
|
-
seahaven: `${gishub}esri:seahaven.json`,
|
|
70
|
-
sangria: `${gishub}esri:sangria.json`,
|
|
71
|
-
mercurial: `${gishub}esri:mercurial.json`,
|
|
72
|
-
imagery: `${gishub}esri:imagery.json`,
|
|
73
|
-
imagery_hybrid: `${gishub}esri:imagery-hybrid.json`,
|
|
74
|
-
firefly: `${gishub}esri:firefly.json`,
|
|
75
|
-
firefly_hybrid: `${gishub}esri:firefly-hybrid.json`,
|
|
76
|
-
oceans: `${gishub}esri:oceans.json`,
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
const carto = 'https://{s}.basemaps.cartocdn.com/rastertiles/';
|
|
80
|
-
const stamen = 'https://stamen-tiles-{s}.a.ssl.fastly.net/';
|
|
81
|
-
const tf = 'https://{s}.tile.thunderforest.com/';
|
|
82
|
-
export const rasterStyleList = {
|
|
83
|
-
osm: {
|
|
84
|
-
org: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
85
|
-
human: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
|
86
|
-
cycle: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
|
|
87
|
-
topo: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
|
88
|
-
_copy: '<a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap</a>',
|
|
89
|
-
},
|
|
90
|
-
carto: {
|
|
91
|
-
voyager: `${carto}voyager_labels_under/{z}/{x}/{y}{r}.png`,
|
|
92
|
-
positron: `${carto}light_all/{z}/{x}/{y}{r}.png`,
|
|
93
|
-
dark: `${carto}dark_all/{z}/{x}/{y}{r}.png`,
|
|
94
|
-
_copy: '<a href="https://carto.com/attribution" target="_blank">© Carto</a>',
|
|
95
|
-
},
|
|
96
|
-
stamen: {
|
|
97
|
-
toner: `${stamen}toner/{z}/{x}/{y}{r}.png`,
|
|
98
|
-
toner_lite: `${stamen}toner-lite/{z}/{x}/{y}{r}.png`,
|
|
99
|
-
watercolor: `${stamen}watercolor/{z}/{x}/{y}.png`,
|
|
100
|
-
terrain: `${stamen}terrain/{z}/{x}/{y}{r}.png`,
|
|
101
|
-
_copy: '<a href="https://stamen.com/privacy-policy" target="_blank">© Stamen Design</a>',
|
|
102
|
-
},
|
|
103
|
-
tf: {
|
|
104
|
-
cycle: `${tf}cycle/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
105
|
-
trans: `${tf}transport/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
106
|
-
trans_dark: `${tf}transport-dark/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
107
|
-
landscape: `${tf}landscape/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
108
|
-
outdoors: `${tf}outdoors/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
109
|
-
neighbourhood: `${tf}neighbourhood/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
110
|
-
spinal: `${tf}spinal-map/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
111
|
-
pioneer: `${tf}pioneer/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
112
|
-
atlas: `${tf}atlas/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
113
|
-
mobile: `${tf}mobile-atlas/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
114
|
-
_copy: '<a href="https://thunderforest.com/privacy" target="_blank">© Thunderforest</a>',
|
|
115
|
-
},
|
|
116
|
-
};
|
package/dist/source/styles.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export const baseStyle = [
|
|
2
|
-
'id',
|
|
3
|
-
'type',
|
|
4
|
-
'filter',
|
|
5
|
-
'source',
|
|
6
|
-
'source-layer',
|
|
7
|
-
'minzoom',
|
|
8
|
-
'metadata',
|
|
9
|
-
'maxzoom',
|
|
10
|
-
'paint',
|
|
11
|
-
'layout'
|
|
12
|
-
];
|
|
13
|
-
export const layoutStyles = [
|
|
14
|
-
'visibility',
|
|
15
|
-
'line-join',
|
|
16
|
-
'line-cap',
|
|
17
|
-
'line-miter-limit',
|
|
18
|
-
'line-round-limit',
|
|
19
|
-
'line-sort-key',
|
|
20
|
-
'circle-sort-key',
|
|
21
|
-
'symbol-avoid-edges',
|
|
22
|
-
'symbol-placement',
|
|
23
|
-
'symbol-sort-key',
|
|
24
|
-
'symbol-spacing',
|
|
25
|
-
'symbol-z-order',
|
|
26
|
-
'icon-allow-overlap',
|
|
27
|
-
'icon-anchor',
|
|
28
|
-
'icon-ignore-placement',
|
|
29
|
-
'icon-image',
|
|
30
|
-
'icon-keep-upright',
|
|
31
|
-
'icon-offset',
|
|
32
|
-
'icon-optional',
|
|
33
|
-
'icon-padding',
|
|
34
|
-
'icon-pitch-alignment',
|
|
35
|
-
'icon-rotate',
|
|
36
|
-
'icon-rotation-alignment',
|
|
37
|
-
'icon-size',
|
|
38
|
-
'icon-text-fit',
|
|
39
|
-
'icon-text-fit-padding',
|
|
40
|
-
'text-allow-overlap',
|
|
41
|
-
'text-anchor',
|
|
42
|
-
'text-field',
|
|
43
|
-
'text-font',
|
|
44
|
-
'text-ignore-placement',
|
|
45
|
-
'text-justify',
|
|
46
|
-
'text-keep-upright',
|
|
47
|
-
'text-letter-spacing',
|
|
48
|
-
'text-line-height',
|
|
49
|
-
'text-max-angle',
|
|
50
|
-
'text-max-width',
|
|
51
|
-
'text-offset',
|
|
52
|
-
'text-optional',
|
|
53
|
-
'text-padding',
|
|
54
|
-
'text-pitch-alignment',
|
|
55
|
-
'text-radial-offset',
|
|
56
|
-
'text-rotate',
|
|
57
|
-
'text-rotation-alignment',
|
|
58
|
-
'text-size',
|
|
59
|
-
'text-transform',
|
|
60
|
-
'text-variable-anchor',
|
|
61
|
-
'text-writing-mode'
|
|
62
|
-
];
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Component } from 'solid-js';
|
|
2
|
-
import type { LngLatLike } from 'mapbox-gl';
|
|
3
|
-
/** Options for rotating the globe. */
|
|
4
|
-
interface RotateGlobeOptions {
|
|
5
|
-
/** The number of seconds per revolution. */
|
|
6
|
-
secPerRev?: number;
|
|
7
|
-
/** The maximum zoom level for spinning the globe. */
|
|
8
|
-
maxSpinZoom?: number;
|
|
9
|
-
/** The zoom level at which the spinning slows down. */
|
|
10
|
-
slowSpinZoom?: number;
|
|
11
|
-
}
|
|
12
|
-
/** Options for rotating the viewport. */
|
|
13
|
-
interface RotateViewportOptions {
|
|
14
|
-
/** The number of seconds per revolution. */
|
|
15
|
-
secPerRev?: number;
|
|
16
|
-
/** The pitch angle in degrees. */
|
|
17
|
-
pitch?: number;
|
|
18
|
-
/** The center of rotation. */
|
|
19
|
-
around?: LngLatLike;
|
|
20
|
-
}
|
|
21
|
-
/** Props for the component. */
|
|
22
|
-
type Props = {
|
|
23
|
-
/** Whether to rotate the globe. */
|
|
24
|
-
rotateGlobe?: boolean | RotateGlobeOptions;
|
|
25
|
-
/** Whether to rotate the viewport. */
|
|
26
|
-
rotateViewport?: boolean | RotateViewportOptions;
|
|
27
|
-
/** Whether to reverse the rotation direction. */
|
|
28
|
-
reverse?: boolean;
|
|
29
|
-
/** Whether to reset the rotation when stopped. */
|
|
30
|
-
resetWhenStopped?: boolean;
|
|
31
|
-
/** Translation options. */
|
|
32
|
-
translate?: {
|
|
33
|
-
/** The type of translation. */
|
|
34
|
-
type?: 'line' | 'sphere';
|
|
35
|
-
/** The starting position. */
|
|
36
|
-
start: [number, number, number];
|
|
37
|
-
/** The ending position. */
|
|
38
|
-
end: [number, number, number];
|
|
39
|
-
/** The target position. */
|
|
40
|
-
target: LngLatLike;
|
|
41
|
-
/** The ending target position. */
|
|
42
|
-
targetEnd?: LngLatLike;
|
|
43
|
-
/** The easing function to use. */
|
|
44
|
-
easing?: 'in' | 'out' | 'inOut';
|
|
45
|
-
/** Whether to loop the translation. */
|
|
46
|
-
loop?: boolean;
|
|
47
|
-
/** The duration of the translation in milliseconds. */
|
|
48
|
-
duration: number;
|
|
49
|
-
};
|
|
50
|
-
/** The children to render. */
|
|
51
|
-
children?: any;
|
|
52
|
-
};
|
|
53
|
-
export declare const Camera: Component<Props>;
|
|
54
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { VoidComponent } from "solid-js";
|
|
2
|
-
import type { Options as AttributionOptions } from "mapbox-gl/src/ui/control/attribution_control";
|
|
3
|
-
import type { Options as FullscreenOptions } from "mapbox-gl/src/ui/control/fullscreen_control";
|
|
4
|
-
import type { Options as GeolocateOptions } from "mapbox-gl/src/ui/control/geolocate_control";
|
|
5
|
-
import type { Options as NavigationOptions } from "mapbox-gl/src/ui/control/navigation_control";
|
|
6
|
-
import type { Options as ScaleOptions } from "mapbox-gl/src/ui/control/scale_control";
|
|
7
|
-
type ControlType = "navigation" | "scale" | "attribution" | "fullscreen" | "geolocate" | "logo" | "terrain";
|
|
8
|
-
type Props = {
|
|
9
|
-
type?: ControlType;
|
|
10
|
-
options?: NavigationOptions | ScaleOptions | AttributionOptions | FullscreenOptions | GeolocateOptions | object;
|
|
11
|
-
custom?: any;
|
|
12
|
-
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
13
|
-
};
|
|
14
|
-
export declare const Control: VoidComponent<Props>;
|
|
15
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
id: string;
|
|
3
|
-
type: string;
|
|
4
|
-
filter: (string | string[])[];
|
|
5
|
-
layout: {
|
|
6
|
-
"text-field": string[];
|
|
7
|
-
"text-anchor": string[];
|
|
8
|
-
"text-offset": (string | string[] | number[])[];
|
|
9
|
-
"text-size": number;
|
|
10
|
-
"text-allow-overlap": boolean;
|
|
11
|
-
"text-ignore-placement": boolean;
|
|
12
|
-
};
|
|
13
|
-
paint: {
|
|
14
|
-
"text-halo-color": string;
|
|
15
|
-
"text-halo-width": number;
|
|
16
|
-
"text-halo-blur": number;
|
|
17
|
-
"text-color": string;
|
|
18
|
-
};
|
|
19
|
-
}[];
|
|
20
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { VoidComponent } from "solid-js";
|
|
2
|
-
import type { drawEventTypes } from "../../events";
|
|
3
|
-
type Props = {
|
|
4
|
-
/** Draw Library */
|
|
5
|
-
lib: any;
|
|
6
|
-
/** Draw Options */
|
|
7
|
-
options?: object;
|
|
8
|
-
/** Draw Control Position */
|
|
9
|
-
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
10
|
-
/** Draw Control Instance */
|
|
11
|
-
getInstance?: (object: any) => void;
|
|
12
|
-
showLength?: boolean;
|
|
13
|
-
showArea?: boolean;
|
|
14
|
-
} & drawEventTypes;
|
|
15
|
-
export declare const Draw: VoidComponent<Props>;
|
|
16
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare const RectangleAssistedMode: {
|
|
2
|
-
onSetup: (opts: any) => {
|
|
3
|
-
rectangle: any;
|
|
4
|
-
currentVertexPosition: number;
|
|
5
|
-
};
|
|
6
|
-
onTap: (state: any, e: any) => void;
|
|
7
|
-
onClick: (state: any, e: any) => any;
|
|
8
|
-
onMouseMove: (state: any, e: any) => void;
|
|
9
|
-
deegrees2meters(px: any): number[];
|
|
10
|
-
meters2degress(px: any): number[];
|
|
11
|
-
calculateOrientedAnglePolygon: (state: any) => void;
|
|
12
|
-
calculatepXY3: (state: any, e: any, tmp: any) => any;
|
|
13
|
-
onKeyUp: (state: any, e: any) => any;
|
|
14
|
-
onStop: (state: any) => void;
|
|
15
|
-
toDisplayFeatures: (state: any, geojson: any, display: any) => any;
|
|
16
|
-
onTrash: (state: any) => void;
|
|
17
|
-
};
|
|
18
|
-
export default RectangleAssistedMode;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { VoidComponent } from 'solid-js';
|
|
2
|
-
import type { StyleImageInterface, StyleImageMetadata } from 'mapbox-gl/src/style/style_image';
|
|
3
|
-
export declare const patternList: string[];
|
|
4
|
-
export type Color = `#${string}` | `rgb(${number}, ${number}, ${number})` | `rgba(${number}, ${number}, ${number}, ${number})` | `hsl(${number}, ${number}%, ${number}%)` | `hsla(${number}, ${number}%, ${number}%, ${number})`;
|
|
5
|
-
type Props = {
|
|
6
|
-
id: string;
|
|
7
|
-
/** The unique identifier for the image. */
|
|
8
|
-
source?: HTMLImageElement | ImageBitmap | ImageData | SVGElement | {
|
|
9
|
-
width: number;
|
|
10
|
-
height: number;
|
|
11
|
-
data: Uint8Array | Uint8ClampedArray;
|
|
12
|
-
} | StyleImageInterface | string;
|
|
13
|
-
/** The image to be used for the image component. */
|
|
14
|
-
options?: StyleImageMetadata & {
|
|
15
|
-
fill?: Color;
|
|
16
|
-
stroke?: Color;
|
|
17
|
-
transform?: string;
|
|
18
|
-
};
|
|
19
|
-
/** The options for the image */
|
|
20
|
-
pattern?: {
|
|
21
|
-
type: string;
|
|
22
|
-
color: Color;
|
|
23
|
-
background: Color;
|
|
24
|
-
lineWith: number;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare const MGL_Image: VoidComponent<Props>;
|
|
28
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Component } from "solid-js";
|
|
2
|
-
import type { layerEventTypes } from "../../events";
|
|
3
|
-
import type { FilterSpecification, StyleSpecification } from "mapbox-gl/src/style-spec/types.js";
|
|
4
|
-
import type { CustomLayerInterface } from "mapbox-gl/src/style/style_layer/custom_style_layer";
|
|
5
|
-
type Props = {
|
|
6
|
-
id?: string;
|
|
7
|
-
/** A string that uniquely identifies the layer. If not provided, a unique ID will be generated. */
|
|
8
|
-
style?: StyleSpecification;
|
|
9
|
-
/** A Mapbox Style Specification object that defines the visual appearance of the layer. */
|
|
10
|
-
customLayer?: CustomLayerInterface;
|
|
11
|
-
/** An object that implements the `CustomLayerInterface` interface, which allows you to create custom layers using WebGL. */
|
|
12
|
-
filter?: FilterSpecification;
|
|
13
|
-
/** A Mapbox filter specification that defines which features of the layer to include or exclude from the layer. */
|
|
14
|
-
visible?: boolean;
|
|
15
|
-
/** A boolean that determines whether the layer is visible or not. */
|
|
16
|
-
sourceId?: string;
|
|
17
|
-
/** A string that specifies the ID of the source that the layer uses for its data. */
|
|
18
|
-
slot?: "bottom" | "middle" | "top" | string;
|
|
19
|
-
/** A string that specifies the slot to which the layer belongs. */
|
|
20
|
-
beforeType?: "background" | "fill" | "line" | "symbol" | "raster" | "circle" | "fill-extrusion" | "heatmap" | "hillshade" | "sky" | string;
|
|
21
|
-
/** A string that specifies the type of layer before which the current layer should be inserted. */
|
|
22
|
-
beforeId?: string;
|
|
23
|
-
/** A string that specifies the ID of the layer before which the current layer should be inserted. */
|
|
24
|
-
featureState?: {
|
|
25
|
-
id: number | string;
|
|
26
|
-
state: object;
|
|
27
|
-
};
|
|
28
|
-
/** An object that specifies the state of a feature in the layer. The object consists of an ID (either a number or a string) and an object containing the state. */
|
|
29
|
-
children?: any;
|
|
30
|
-
} & layerEventTypes;
|
|
31
|
-
export declare const Layer: Component<Props>;
|
|
32
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Component, JSX } from "solid-js";
|
|
2
|
-
declare global {
|
|
3
|
-
interface Window {
|
|
4
|
-
BABYLON?: any;
|
|
5
|
-
THREE?: any;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
type Props = {
|
|
9
|
-
id?: string;
|
|
10
|
-
origin?: [number, number, number?];
|
|
11
|
-
defaultLight?: boolean;
|
|
12
|
-
babylon?: boolean;
|
|
13
|
-
onAdd?: (scene: any, map: any, gl: any) => void;
|
|
14
|
-
onRender?: (gl: any, matrix: any) => void;
|
|
15
|
-
children?: JSX.Element | JSX.Element[];
|
|
16
|
-
/** A string that specifies the type of layer before which the current layer should be inserted. */
|
|
17
|
-
beforeId?: string;
|
|
18
|
-
disableProjectionMatrix?: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare const useScene: () => any;
|
|
21
|
-
export declare const Layer3D: Component<Props>;
|
|
22
|
-
export {};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Component } from "solid-js";
|
|
2
|
-
import "mapbox-gl/dist/mapbox-gl.css";
|
|
3
|
-
import type { mapEventTypes } from "../../events";
|
|
4
|
-
import type mapboxgl from "mapbox-gl";
|
|
5
|
-
import type { MapboxOptions } from "mapbox-gl/src/ui/map";
|
|
6
|
-
import type { LngLatLike } from "mapbox-gl/src/geo/lng_lat.js";
|
|
7
|
-
import type { LngLatBounds } from "mapbox-gl/src/geo/lng_lat_bounds.js";
|
|
8
|
-
import type { PaddingOptions } from "mapbox-gl/src/geo/edge_insets.js";
|
|
9
|
-
import type { StyleSpecification } from "mapbox-gl/src/style-spec/types.js";
|
|
10
|
-
import type { JSX } from "solid-js";
|
|
11
|
-
declare global {
|
|
12
|
-
interface Window {
|
|
13
|
-
MapLib?: any;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export type Map = mapboxgl.Map & {
|
|
17
|
-
debug: boolean;
|
|
18
|
-
debugEvents: boolean;
|
|
19
|
-
sourceIdList: string[];
|
|
20
|
-
layerIdList: string[];
|
|
21
|
-
};
|
|
22
|
-
export type Viewport = {
|
|
23
|
-
id?: string;
|
|
24
|
-
point?: {
|
|
25
|
-
x: number;
|
|
26
|
-
y: number;
|
|
27
|
-
};
|
|
28
|
-
center?: LngLatLike;
|
|
29
|
-
bounds?: LngLatBounds;
|
|
30
|
-
zoom?: number;
|
|
31
|
-
pitch?: number;
|
|
32
|
-
bearing?: number;
|
|
33
|
-
padding?: PaddingOptions;
|
|
34
|
-
inTransit?: boolean;
|
|
35
|
-
};
|
|
36
|
-
type Props = {
|
|
37
|
-
/** ID for the map container element */
|
|
38
|
-
id?: string;
|
|
39
|
-
/** Map Container CSS Style */
|
|
40
|
-
style?: JSX.CSSProperties;
|
|
41
|
-
/** Map Container CSS Class */
|
|
42
|
-
class?: string;
|
|
43
|
-
/** SolidJS Class List for Map Container */
|
|
44
|
-
classList?: {
|
|
45
|
-
[k: string]: boolean | undefined;
|
|
46
|
-
};
|
|
47
|
-
/** Current Map View */
|
|
48
|
-
viewport?: Viewport;
|
|
49
|
-
/** Mapbox Options
|
|
50
|
-
* @see https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters
|
|
51
|
-
*/
|
|
52
|
-
options?: MapboxOptions;
|
|
53
|
-
/** Mapbox Style Configuration
|
|
54
|
-
* @see https://docs.mapbox.com/mapbox-gl-js/guides/styles/#configure-a-style
|
|
55
|
-
*/
|
|
56
|
-
config?: {
|
|
57
|
-
id?: string;
|
|
58
|
-
lightPreset?: "dawn" | "day" | "dusk" | "night" | string;
|
|
59
|
-
showPlaceLabels?: boolean;
|
|
60
|
-
showRoadLabels?: boolean;
|
|
61
|
-
showPointOfInterestLabels?: boolean;
|
|
62
|
-
showTransitLabels?: boolean;
|
|
63
|
-
font?: string[];
|
|
64
|
-
[key: string]: boolean | string | string[];
|
|
65
|
-
};
|
|
66
|
-
/** Type for pan, move and zoom transitions */
|
|
67
|
-
transitionType?: "flyTo" | "easeTo" | "jumpTo" | string;
|
|
68
|
-
/** Event listener for Viewport updates */
|
|
69
|
-
onViewportChange?: (viewport: Viewport) => void;
|
|
70
|
-
/** Event listener for User Interaction */
|
|
71
|
-
onUserInteraction?: (user: boolean) => void;
|
|
72
|
-
/** Displays Map Tile Borders */
|
|
73
|
-
showTileBoundaries?: boolean;
|
|
74
|
-
/** Displays Wireframe if Terrain is visible */
|
|
75
|
-
showTerrainWireframe?: boolean;
|
|
76
|
-
/** Displays Borders if Padding is set */
|
|
77
|
-
showPadding?: boolean;
|
|
78
|
-
/** Displays Label Collision Boxes */
|
|
79
|
-
showCollisionBoxes?: boolean;
|
|
80
|
-
/** Displays all feature outlines even if normally not drawn by style rules */
|
|
81
|
-
showOverdrawInspector?: boolean;
|
|
82
|
-
/** Mouse Cursor Style */
|
|
83
|
-
cursorStyle?: string;
|
|
84
|
-
darkStyle?: StyleSpecification | string;
|
|
85
|
-
disableResize?: boolean;
|
|
86
|
-
mapLib?: any;
|
|
87
|
-
apikey?: string;
|
|
88
|
-
debug?: boolean;
|
|
89
|
-
debugEvents?: boolean;
|
|
90
|
-
ref?: HTMLDivElement;
|
|
91
|
-
/** Children within the Map Container */
|
|
92
|
-
children?: any;
|
|
93
|
-
} & mapEventTypes;
|
|
94
|
-
/** Creates a new Map Container */
|
|
95
|
-
export declare const MapGL: Component<Props>;
|
|
96
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ParentComponent } from 'solid-js';
|
|
2
|
-
import type { Map } from '../MapGL';
|
|
3
|
-
export declare const MapContext: import("solid-js").Context<{
|
|
4
|
-
map: any;
|
|
5
|
-
}[]>;
|
|
6
|
-
export declare const useMapContext: () => {
|
|
7
|
-
map: any;
|
|
8
|
-
}[];
|
|
9
|
-
export declare const MapProvider: ParentComponent<{
|
|
10
|
-
map?: Map;
|
|
11
|
-
}>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Component } from 'solid-js';
|
|
2
|
-
import type { PopupOptions, MarkerOptions, LngLatLike } from 'mapbox-gl';
|
|
3
|
-
type Props = {
|
|
4
|
-
/** The geographical location to place the marker */
|
|
5
|
-
lngLat: LngLatLike;
|
|
6
|
-
/** Options for the Mapbox GL JS marker */
|
|
7
|
-
options?: MarkerOptions;
|
|
8
|
-
/** Options for the Mapbox GL JS popup that is associated with the marker */
|
|
9
|
-
popup?: PopupOptions;
|
|
10
|
-
/** Whether the marker's associated popup should be open */
|
|
11
|
-
showPopup?: boolean;
|
|
12
|
-
/** Whether the marker is draggable */
|
|
13
|
-
draggable?: boolean;
|
|
14
|
-
/** A function that is called when the marker's associated popup is opened */
|
|
15
|
-
onOpen?: () => void;
|
|
16
|
-
/** A function that is called when the marker's associated popup is closed */
|
|
17
|
-
onClose?: () => void;
|
|
18
|
-
/** A function that is called when the marker starts being dragged */
|
|
19
|
-
onDragStart?: () => void;
|
|
20
|
-
/** A function that is called when the marker stops being dragged */
|
|
21
|
-
onDragEnd?: () => void;
|
|
22
|
-
/** A function that is called when the marker is being dragged */
|
|
23
|
-
onDrag?: (lngLat: number[]) => void;
|
|
24
|
-
/** The content to be displayed in the marker's associated popup */
|
|
25
|
-
children?: any;
|
|
26
|
-
};
|
|
27
|
-
export declare const Marker: Component<Props>;
|
|
28
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Component } from "solid-js";
|
|
2
|
-
import type { PopupOptions, LngLatLike } from "mapbox-gl";
|
|
3
|
-
type Props = {
|
|
4
|
-
/** Options for configuring the popup */
|
|
5
|
-
options?: PopupOptions;
|
|
6
|
-
/** Flag for tracking the mouse pointer */
|
|
7
|
-
trackPointer?: boolean;
|
|
8
|
-
/** Longitude and latitude for the popup */
|
|
9
|
-
lngLat?: LngLatLike;
|
|
10
|
-
/** Callback for when the popup is opened */
|
|
11
|
-
onOpen?: () => void;
|
|
12
|
-
/** Callback for when the popup is closed */
|
|
13
|
-
onClose?: () => void;
|
|
14
|
-
/** Children to display within the popup */
|
|
15
|
-
children?: any;
|
|
16
|
-
};
|
|
17
|
-
export declare const Popup: Component<Props>;
|
|
18
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Component } from 'solid-js';
|
|
2
|
-
import type { SourceSpecification } from 'mapbox-gl/src/style-spec/types.js';
|
|
3
|
-
export declare const useSourceId: () => string;
|
|
4
|
-
type Props = {
|
|
5
|
-
/** @optional Source ID for referencing non nexted Layers */
|
|
6
|
-
id?: string;
|
|
7
|
-
/** @see https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/ */
|
|
8
|
-
source: SourceSpecification;
|
|
9
|
-
/** The map layers associated with this source */
|
|
10
|
-
children?: any;
|
|
11
|
-
};
|
|
12
|
-
export declare const Source: Component<Props>;
|
|
13
|
-
export {};
|