@colisweb/rescript-toolkit 5.8.1 → 5.9.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/package.json +1 -1
- package/src/vendors/Here.res +99 -0
package/package.json
CHANGED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
type coordinates = {
|
|
2
|
+
lat: float,
|
|
3
|
+
lng: float,
|
|
4
|
+
}
|
|
5
|
+
module Layers = {
|
|
6
|
+
type map
|
|
7
|
+
|
|
8
|
+
type rec t = {vector: vector}
|
|
9
|
+
and vector = {normal: normalVector}
|
|
10
|
+
and normalVector = {map: map}
|
|
11
|
+
}
|
|
12
|
+
module Platform = {
|
|
13
|
+
type t
|
|
14
|
+
type options = {apikey: string}
|
|
15
|
+
|
|
16
|
+
@new
|
|
17
|
+
external make: options => t = "H.service.Platform"
|
|
18
|
+
|
|
19
|
+
type layersOptions = {pois: bool}
|
|
20
|
+
|
|
21
|
+
@send
|
|
22
|
+
external createDefaultLayers: (t, layersOptions) => Layers.t = "createDefaultLayers"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
module Map = {
|
|
26
|
+
type instance
|
|
27
|
+
|
|
28
|
+
type options = {
|
|
29
|
+
zoom: int,
|
|
30
|
+
center: coordinates,
|
|
31
|
+
}
|
|
32
|
+
@new
|
|
33
|
+
external make: (Dom.element, Layers.map, options) => instance = "H.Map"
|
|
34
|
+
|
|
35
|
+
module Marker = {
|
|
36
|
+
type t
|
|
37
|
+
|
|
38
|
+
@new
|
|
39
|
+
external make: coordinates => t = "H.map.Marker"
|
|
40
|
+
|
|
41
|
+
@send
|
|
42
|
+
external setData: (t, string) => unit = "setData"
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module Viewport = {
|
|
46
|
+
type t
|
|
47
|
+
|
|
48
|
+
@send
|
|
49
|
+
external resize: (t, unit) => unit = "resize"
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module Group = {
|
|
53
|
+
type t
|
|
54
|
+
@new
|
|
55
|
+
external make: unit => t = "H.map.Group"
|
|
56
|
+
|
|
57
|
+
@send
|
|
58
|
+
external addEventListener: (t, string, 'event => unit) => unit = "addEventListener"
|
|
59
|
+
|
|
60
|
+
@send
|
|
61
|
+
external addMarker: (t, Marker.t) => unit = "addObject"
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@send
|
|
65
|
+
external addMarker: (instance, Marker.t) => unit = "addObject"
|
|
66
|
+
@send
|
|
67
|
+
external addGroup: (instance, Group.t) => unit = "addObject"
|
|
68
|
+
|
|
69
|
+
@send
|
|
70
|
+
external getViewPort: (instance, unit) => Viewport.t = "getViewPort"
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
module MapEvents = {
|
|
74
|
+
type t
|
|
75
|
+
|
|
76
|
+
@new
|
|
77
|
+
external make: Map.instance => t = "H.mapevents.MapEvents"
|
|
78
|
+
}
|
|
79
|
+
module Behavior = {
|
|
80
|
+
type t
|
|
81
|
+
|
|
82
|
+
@new
|
|
83
|
+
external make: MapEvents.t => t = "H.mapevents.Behavior"
|
|
84
|
+
}
|
|
85
|
+
module Ui = {
|
|
86
|
+
type t
|
|
87
|
+
|
|
88
|
+
@new
|
|
89
|
+
external createDefault: (Map.instance, Layers.t) => t = "H.ui.UI.createDefault"
|
|
90
|
+
|
|
91
|
+
module InfoBubble = {
|
|
92
|
+
type t
|
|
93
|
+
@new
|
|
94
|
+
external make: ('geometry, 'data) => t = "H.ui.InfoBubble"
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@send
|
|
98
|
+
external addBubble: (t, InfoBubble.t) => unit = "addBubble"
|
|
99
|
+
}
|