react-native-maps 1.26.0 → 1.26.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 +13 -11
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +2 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +2 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +2 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +1 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +2 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +1 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +2 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +2 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +2 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerInterface.java +2 -1
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerInterface.java +2 -1
- package/android/src/main/jni/CMakeLists.txt +1 -9
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +517 -517
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +808 -20
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +664 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +12 -111
- package/ios/generated/RCTAppDependencyProvider.mm +13 -28
- package/ios/generated/RCTModuleProviders.h +16 -0
- package/ios/generated/RCTModuleProviders.mm +51 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +30 -9
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +9 -2
- package/ios/generated/RCTUnstableModulesRequiringMainQueueSetupProvider.h +14 -0
- package/ios/generated/RCTUnstableModulesRequiringMainQueueSetupProvider.mm +19 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.cpp +517 -517
- package/ios/generated/RNMapsSpecs/Props.cpp +808 -20
- package/ios/generated/RNMapsSpecs/Props.h +664 -0
- package/ios/generated/RNMapsSpecs/States.h +12 -111
- package/ios/generated/ReactAppDependencyProvider.podspec +1 -1
- package/ios/generated/ReactCodegen.podspec +120 -0
- package/package.json +14 -14
- package/plugin/build/android.js +2 -2
- package/plugin/build/ios.js +8 -8
- package/react-native-maps.podspec +4 -0
- package/src/MapMarkerNativeComponent.ts +1 -1
- package/src/MapViewNativeComponent.ts +1 -1
- package/src/specs/NativeComponentCallout.ts +1 -1
- package/src/specs/NativeComponentCircle.ts +1 -1
- package/src/specs/NativeComponentGoogleMapView.ts +1 -2
- package/src/specs/NativeComponentGooglePolygon.ts +1 -1
- package/src/specs/NativeComponentMapView.ts +1 -2
- package/src/specs/NativeComponentMarker.ts +1 -2
- package/src/specs/NativeComponentOverlay.ts +1 -1
- package/src/specs/NativeComponentPolyline.ts +1 -1
- package/src/specs/NativeComponentUrlTile.ts +1 -1
- package/src/specs/NativeComponentWMSTile.ts +1 -1
|
@@ -13,964 +13,964 @@
|
|
|
13
13
|
|
|
14
14
|
namespace facebook::react {
|
|
15
15
|
|
|
16
|
-
void RNMapsCalloutEventEmitter::onPress(OnPress
|
|
17
|
-
dispatchEvent("press", [
|
|
18
|
-
auto
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
void RNMapsCalloutEventEmitter::onPress(OnPress event) const {
|
|
17
|
+
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
18
|
+
auto payload = jsi::Object(runtime);
|
|
19
|
+
payload.setProperty(runtime, "action", event.action);
|
|
20
|
+
payload.setProperty(runtime, "id", event.id);
|
|
21
21
|
{
|
|
22
22
|
auto coordinate = jsi::Object(runtime);
|
|
23
|
-
coordinate.setProperty(runtime, "latitude",
|
|
24
|
-
coordinate.setProperty(runtime, "longitude",
|
|
25
|
-
|
|
23
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
24
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
25
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
26
26
|
}
|
|
27
27
|
{
|
|
28
28
|
auto position = jsi::Object(runtime);
|
|
29
|
-
position.setProperty(runtime, "x",
|
|
30
|
-
position.setProperty(runtime, "y",
|
|
31
|
-
|
|
29
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
30
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
31
|
+
payload.setProperty(runtime, "position", position);
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return payload;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
void RNMapsCircleEventEmitter::onPress(OnPress
|
|
39
|
-
dispatchEvent("press", [
|
|
40
|
-
auto
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
void RNMapsCircleEventEmitter::onPress(OnPress event) const {
|
|
39
|
+
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
40
|
+
auto payload = jsi::Object(runtime);
|
|
41
|
+
payload.setProperty(runtime, "action", event.action);
|
|
42
|
+
payload.setProperty(runtime, "id", event.id);
|
|
43
43
|
{
|
|
44
44
|
auto coordinate = jsi::Object(runtime);
|
|
45
|
-
coordinate.setProperty(runtime, "latitude",
|
|
46
|
-
coordinate.setProperty(runtime, "longitude",
|
|
47
|
-
|
|
45
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
46
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
47
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
48
48
|
}
|
|
49
49
|
{
|
|
50
50
|
auto position = jsi::Object(runtime);
|
|
51
|
-
position.setProperty(runtime, "x",
|
|
52
|
-
position.setProperty(runtime, "y",
|
|
53
|
-
|
|
51
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
52
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
53
|
+
payload.setProperty(runtime, "position", position);
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return payload;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
void RNMapsGoogleMapViewEventEmitter::onIndoorBuildingFocused(OnIndoorBuildingFocused
|
|
61
|
-
dispatchEvent("indoorBuildingFocused", [
|
|
62
|
-
auto
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return
|
|
60
|
+
void RNMapsGoogleMapViewEventEmitter::onIndoorBuildingFocused(OnIndoorBuildingFocused event) const {
|
|
61
|
+
dispatchEvent("indoorBuildingFocused", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
62
|
+
auto payload = jsi::Object(runtime);
|
|
63
|
+
payload.setProperty(runtime, "underground", event.underground);
|
|
64
|
+
payload.setProperty(runtime, "activeLevelIndex", event.activeLevelIndex);
|
|
65
|
+
payload.setProperty(runtime, "levels", event.levels);
|
|
66
|
+
return payload;
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
void RNMapsGoogleMapViewEventEmitter::onIndoorLevelActivated(OnIndoorLevelActivated
|
|
72
|
-
dispatchEvent("indoorLevelActivated", [
|
|
73
|
-
auto
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return
|
|
71
|
+
void RNMapsGoogleMapViewEventEmitter::onIndoorLevelActivated(OnIndoorLevelActivated event) const {
|
|
72
|
+
dispatchEvent("indoorLevelActivated", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
73
|
+
auto payload = jsi::Object(runtime);
|
|
74
|
+
payload.setProperty(runtime, "activeLevelIndex", event.activeLevelIndex);
|
|
75
|
+
payload.setProperty(runtime, "name", event.name);
|
|
76
|
+
payload.setProperty(runtime, "shortName", event.shortName);
|
|
77
|
+
return payload;
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
void RNMapsGoogleMapViewEventEmitter::onKmlReady(OnKmlReady
|
|
82
|
+
void RNMapsGoogleMapViewEventEmitter::onKmlReady(OnKmlReady event) const {
|
|
83
83
|
dispatchEvent("kmlReady", [](jsi::Runtime &runtime) {
|
|
84
|
-
auto
|
|
84
|
+
auto payload = jsi::Object(runtime);
|
|
85
85
|
|
|
86
|
-
return
|
|
86
|
+
return payload;
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
void RNMapsGoogleMapViewEventEmitter::onLongPress(OnLongPress
|
|
92
|
-
dispatchEvent("longPress", [
|
|
93
|
-
auto
|
|
91
|
+
void RNMapsGoogleMapViewEventEmitter::onLongPress(OnLongPress event) const {
|
|
92
|
+
dispatchEvent("longPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
93
|
+
auto payload = jsi::Object(runtime);
|
|
94
94
|
{
|
|
95
95
|
auto coordinate = jsi::Object(runtime);
|
|
96
|
-
coordinate.setProperty(runtime, "latitude",
|
|
97
|
-
coordinate.setProperty(runtime, "longitude",
|
|
98
|
-
|
|
96
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
97
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
98
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
99
99
|
}
|
|
100
100
|
{
|
|
101
101
|
auto position = jsi::Object(runtime);
|
|
102
|
-
position.setProperty(runtime, "x",
|
|
103
|
-
position.setProperty(runtime, "y",
|
|
104
|
-
|
|
102
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
103
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
104
|
+
payload.setProperty(runtime, "position", position);
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
return
|
|
106
|
+
payload.setProperty(runtime, "action", event.action);
|
|
107
|
+
return payload;
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
void RNMapsGoogleMapViewEventEmitter::onMapLoaded(OnMapLoaded
|
|
112
|
+
void RNMapsGoogleMapViewEventEmitter::onMapLoaded(OnMapLoaded event) const {
|
|
113
113
|
dispatchEvent("mapLoaded", [](jsi::Runtime &runtime) {
|
|
114
|
-
auto
|
|
114
|
+
auto payload = jsi::Object(runtime);
|
|
115
115
|
|
|
116
|
-
return
|
|
116
|
+
return payload;
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
void RNMapsGoogleMapViewEventEmitter::onMapReady(OnMapReady
|
|
121
|
+
void RNMapsGoogleMapViewEventEmitter::onMapReady(OnMapReady event) const {
|
|
122
122
|
dispatchEvent("mapReady", [](jsi::Runtime &runtime) {
|
|
123
|
-
auto
|
|
123
|
+
auto payload = jsi::Object(runtime);
|
|
124
124
|
|
|
125
|
-
return
|
|
125
|
+
return payload;
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
void RNMapsGoogleMapViewEventEmitter::onMarkerDeselect(OnMarkerDeselect
|
|
131
|
-
dispatchEvent("markerDeselect", [
|
|
132
|
-
auto
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
void RNMapsGoogleMapViewEventEmitter::onMarkerDeselect(OnMarkerDeselect event) const {
|
|
131
|
+
dispatchEvent("markerDeselect", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
132
|
+
auto payload = jsi::Object(runtime);
|
|
133
|
+
payload.setProperty(runtime, "action", event.action);
|
|
134
|
+
payload.setProperty(runtime, "id", event.id);
|
|
135
135
|
{
|
|
136
136
|
auto coordinate = jsi::Object(runtime);
|
|
137
|
-
coordinate.setProperty(runtime, "latitude",
|
|
138
|
-
coordinate.setProperty(runtime, "longitude",
|
|
139
|
-
|
|
137
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
138
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
139
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
140
140
|
}
|
|
141
|
-
return
|
|
141
|
+
return payload;
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
void RNMapsGoogleMapViewEventEmitter::onMarkerDrag(OnMarkerDrag
|
|
147
|
-
dispatchEvent("markerDrag", [
|
|
148
|
-
auto
|
|
146
|
+
void RNMapsGoogleMapViewEventEmitter::onMarkerDrag(OnMarkerDrag event) const {
|
|
147
|
+
dispatchEvent("markerDrag", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
148
|
+
auto payload = jsi::Object(runtime);
|
|
149
149
|
{
|
|
150
150
|
auto coordinate = jsi::Object(runtime);
|
|
151
|
-
coordinate.setProperty(runtime, "latitude",
|
|
152
|
-
coordinate.setProperty(runtime, "longitude",
|
|
153
|
-
|
|
151
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
152
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
153
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
154
154
|
}
|
|
155
155
|
{
|
|
156
156
|
auto position = jsi::Object(runtime);
|
|
157
|
-
position.setProperty(runtime, "x",
|
|
158
|
-
position.setProperty(runtime, "y",
|
|
159
|
-
|
|
157
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
158
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
159
|
+
payload.setProperty(runtime, "position", position);
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
return
|
|
161
|
+
payload.setProperty(runtime, "id", event.id);
|
|
162
|
+
return payload;
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
|
|
167
|
-
void RNMapsGoogleMapViewEventEmitter::onMarkerDragEnd(OnMarkerDragEnd
|
|
168
|
-
dispatchEvent("markerDragEnd", [
|
|
169
|
-
auto
|
|
167
|
+
void RNMapsGoogleMapViewEventEmitter::onMarkerDragEnd(OnMarkerDragEnd event) const {
|
|
168
|
+
dispatchEvent("markerDragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
169
|
+
auto payload = jsi::Object(runtime);
|
|
170
170
|
{
|
|
171
171
|
auto coordinate = jsi::Object(runtime);
|
|
172
|
-
coordinate.setProperty(runtime, "latitude",
|
|
173
|
-
coordinate.setProperty(runtime, "longitude",
|
|
174
|
-
|
|
172
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
173
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
174
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
payload.setProperty(runtime, "id", event.id);
|
|
177
177
|
{
|
|
178
178
|
auto position = jsi::Object(runtime);
|
|
179
|
-
position.setProperty(runtime, "x",
|
|
180
|
-
position.setProperty(runtime, "y",
|
|
181
|
-
|
|
179
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
180
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
181
|
+
payload.setProperty(runtime, "position", position);
|
|
182
182
|
}
|
|
183
|
-
return
|
|
183
|
+
return payload;
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
|
|
188
|
-
void RNMapsGoogleMapViewEventEmitter::onMarkerDragStart(OnMarkerDragStart
|
|
189
|
-
dispatchEvent("markerDragStart", [
|
|
190
|
-
auto
|
|
188
|
+
void RNMapsGoogleMapViewEventEmitter::onMarkerDragStart(OnMarkerDragStart event) const {
|
|
189
|
+
dispatchEvent("markerDragStart", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
190
|
+
auto payload = jsi::Object(runtime);
|
|
191
191
|
{
|
|
192
192
|
auto coordinate = jsi::Object(runtime);
|
|
193
|
-
coordinate.setProperty(runtime, "latitude",
|
|
194
|
-
coordinate.setProperty(runtime, "longitude",
|
|
195
|
-
|
|
193
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
194
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
195
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
196
196
|
}
|
|
197
|
-
|
|
197
|
+
payload.setProperty(runtime, "id", event.id);
|
|
198
198
|
{
|
|
199
199
|
auto position = jsi::Object(runtime);
|
|
200
|
-
position.setProperty(runtime, "x",
|
|
201
|
-
position.setProperty(runtime, "y",
|
|
202
|
-
|
|
200
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
201
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
202
|
+
payload.setProperty(runtime, "position", position);
|
|
203
203
|
}
|
|
204
|
-
return
|
|
204
|
+
return payload;
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
void RNMapsGoogleMapViewEventEmitter::onMarkerPress(OnMarkerPress
|
|
210
|
-
dispatchEvent("markerPress", [
|
|
211
|
-
auto
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
void RNMapsGoogleMapViewEventEmitter::onMarkerPress(OnMarkerPress event) const {
|
|
210
|
+
dispatchEvent("markerPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
211
|
+
auto payload = jsi::Object(runtime);
|
|
212
|
+
payload.setProperty(runtime, "action", event.action);
|
|
213
|
+
payload.setProperty(runtime, "id", event.id);
|
|
214
214
|
{
|
|
215
215
|
auto coordinate = jsi::Object(runtime);
|
|
216
|
-
coordinate.setProperty(runtime, "latitude",
|
|
217
|
-
coordinate.setProperty(runtime, "longitude",
|
|
218
|
-
|
|
216
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
217
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
218
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
219
219
|
}
|
|
220
220
|
{
|
|
221
221
|
auto position = jsi::Object(runtime);
|
|
222
|
-
position.setProperty(runtime, "x",
|
|
223
|
-
position.setProperty(runtime, "y",
|
|
224
|
-
|
|
222
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
223
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
224
|
+
payload.setProperty(runtime, "position", position);
|
|
225
225
|
}
|
|
226
|
-
return
|
|
226
|
+
return payload;
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
|
|
231
|
-
void RNMapsGoogleMapViewEventEmitter::onMarkerSelect(OnMarkerSelect
|
|
232
|
-
dispatchEvent("markerSelect", [
|
|
233
|
-
auto
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
void RNMapsGoogleMapViewEventEmitter::onMarkerSelect(OnMarkerSelect event) const {
|
|
232
|
+
dispatchEvent("markerSelect", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
233
|
+
auto payload = jsi::Object(runtime);
|
|
234
|
+
payload.setProperty(runtime, "action", event.action);
|
|
235
|
+
payload.setProperty(runtime, "id", event.id);
|
|
236
236
|
{
|
|
237
237
|
auto coordinate = jsi::Object(runtime);
|
|
238
|
-
coordinate.setProperty(runtime, "latitude",
|
|
239
|
-
coordinate.setProperty(runtime, "longitude",
|
|
240
|
-
|
|
238
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
239
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
240
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
241
241
|
}
|
|
242
|
-
return
|
|
242
|
+
return payload;
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
|
|
247
|
-
void RNMapsGoogleMapViewEventEmitter::onPanDrag(OnPanDrag
|
|
248
|
-
dispatchEvent("panDrag", [
|
|
249
|
-
auto
|
|
247
|
+
void RNMapsGoogleMapViewEventEmitter::onPanDrag(OnPanDrag event) const {
|
|
248
|
+
dispatchEvent("panDrag", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
249
|
+
auto payload = jsi::Object(runtime);
|
|
250
250
|
{
|
|
251
251
|
auto coordinate = jsi::Object(runtime);
|
|
252
|
-
coordinate.setProperty(runtime, "latitude",
|
|
253
|
-
coordinate.setProperty(runtime, "longitude",
|
|
254
|
-
|
|
252
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
253
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
254
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
255
255
|
}
|
|
256
256
|
{
|
|
257
257
|
auto position = jsi::Object(runtime);
|
|
258
|
-
position.setProperty(runtime, "x",
|
|
259
|
-
position.setProperty(runtime, "y",
|
|
260
|
-
|
|
258
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
259
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
260
|
+
payload.setProperty(runtime, "position", position);
|
|
261
261
|
}
|
|
262
|
-
return
|
|
262
|
+
return payload;
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
|
|
267
|
-
void RNMapsGoogleMapViewEventEmitter::onPoiClick(OnPoiClick
|
|
268
|
-
dispatchEvent("poiClick", [
|
|
269
|
-
auto
|
|
270
|
-
|
|
271
|
-
|
|
267
|
+
void RNMapsGoogleMapViewEventEmitter::onPoiClick(OnPoiClick event) const {
|
|
268
|
+
dispatchEvent("poiClick", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
269
|
+
auto payload = jsi::Object(runtime);
|
|
270
|
+
payload.setProperty(runtime, "placeId", event.placeId);
|
|
271
|
+
payload.setProperty(runtime, "name", event.name);
|
|
272
272
|
{
|
|
273
273
|
auto coordinate = jsi::Object(runtime);
|
|
274
|
-
coordinate.setProperty(runtime, "latitude",
|
|
275
|
-
coordinate.setProperty(runtime, "longitude",
|
|
276
|
-
|
|
274
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
275
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
276
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
277
277
|
}
|
|
278
278
|
{
|
|
279
279
|
auto position = jsi::Object(runtime);
|
|
280
|
-
position.setProperty(runtime, "x",
|
|
281
|
-
position.setProperty(runtime, "y",
|
|
282
|
-
|
|
280
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
281
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
282
|
+
payload.setProperty(runtime, "position", position);
|
|
283
283
|
}
|
|
284
|
-
return
|
|
284
|
+
return payload;
|
|
285
285
|
});
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
|
|
289
|
-
void RNMapsGoogleMapViewEventEmitter::onPress(OnPress
|
|
290
|
-
dispatchEvent("press", [
|
|
291
|
-
auto
|
|
289
|
+
void RNMapsGoogleMapViewEventEmitter::onPress(OnPress event) const {
|
|
290
|
+
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
291
|
+
auto payload = jsi::Object(runtime);
|
|
292
292
|
{
|
|
293
293
|
auto coordinate = jsi::Object(runtime);
|
|
294
|
-
coordinate.setProperty(runtime, "latitude",
|
|
295
|
-
coordinate.setProperty(runtime, "longitude",
|
|
296
|
-
|
|
294
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
295
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
296
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
297
297
|
}
|
|
298
298
|
{
|
|
299
299
|
auto position = jsi::Object(runtime);
|
|
300
|
-
position.setProperty(runtime, "x",
|
|
301
|
-
position.setProperty(runtime, "y",
|
|
302
|
-
|
|
300
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
301
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
302
|
+
payload.setProperty(runtime, "position", position);
|
|
303
303
|
}
|
|
304
|
-
|
|
305
|
-
return
|
|
304
|
+
payload.setProperty(runtime, "action", event.action);
|
|
305
|
+
return payload;
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
|
|
310
|
-
void RNMapsGoogleMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart
|
|
311
|
-
dispatchEvent("regionChangeStart", [
|
|
312
|
-
auto
|
|
310
|
+
void RNMapsGoogleMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart event) const {
|
|
311
|
+
dispatchEvent("regionChangeStart", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
312
|
+
auto payload = jsi::Object(runtime);
|
|
313
313
|
{
|
|
314
314
|
auto region = jsi::Object(runtime);
|
|
315
|
-
region.setProperty(runtime, "latitude",
|
|
316
|
-
region.setProperty(runtime, "longitude",
|
|
317
|
-
region.setProperty(runtime, "latitudeDelta",
|
|
318
|
-
region.setProperty(runtime, "longitudeDelta",
|
|
319
|
-
|
|
315
|
+
region.setProperty(runtime, "latitude", event.region.latitude);
|
|
316
|
+
region.setProperty(runtime, "longitude", event.region.longitude);
|
|
317
|
+
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
|
|
318
|
+
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
|
|
319
|
+
payload.setProperty(runtime, "region", region);
|
|
320
320
|
}
|
|
321
|
-
|
|
322
|
-
return
|
|
321
|
+
payload.setProperty(runtime, "isGesture", event.isGesture);
|
|
322
|
+
return payload;
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
|
|
327
|
-
void RNMapsGoogleMapViewEventEmitter::onRegionChange(OnRegionChange
|
|
328
|
-
dispatchEvent("regionChange", [
|
|
329
|
-
auto
|
|
327
|
+
void RNMapsGoogleMapViewEventEmitter::onRegionChange(OnRegionChange event) const {
|
|
328
|
+
dispatchEvent("regionChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
329
|
+
auto payload = jsi::Object(runtime);
|
|
330
330
|
{
|
|
331
331
|
auto region = jsi::Object(runtime);
|
|
332
|
-
region.setProperty(runtime, "latitude",
|
|
333
|
-
region.setProperty(runtime, "longitude",
|
|
334
|
-
region.setProperty(runtime, "latitudeDelta",
|
|
335
|
-
region.setProperty(runtime, "longitudeDelta",
|
|
336
|
-
|
|
332
|
+
region.setProperty(runtime, "latitude", event.region.latitude);
|
|
333
|
+
region.setProperty(runtime, "longitude", event.region.longitude);
|
|
334
|
+
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
|
|
335
|
+
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
|
|
336
|
+
payload.setProperty(runtime, "region", region);
|
|
337
337
|
}
|
|
338
|
-
|
|
339
|
-
return
|
|
338
|
+
payload.setProperty(runtime, "isGesture", event.isGesture);
|
|
339
|
+
return payload;
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
|
|
344
|
-
void RNMapsGoogleMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete
|
|
345
|
-
dispatchEvent("regionChangeComplete", [
|
|
346
|
-
auto
|
|
344
|
+
void RNMapsGoogleMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete event) const {
|
|
345
|
+
dispatchEvent("regionChangeComplete", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
346
|
+
auto payload = jsi::Object(runtime);
|
|
347
347
|
{
|
|
348
348
|
auto region = jsi::Object(runtime);
|
|
349
|
-
region.setProperty(runtime, "latitude",
|
|
350
|
-
region.setProperty(runtime, "longitude",
|
|
351
|
-
region.setProperty(runtime, "latitudeDelta",
|
|
352
|
-
region.setProperty(runtime, "longitudeDelta",
|
|
353
|
-
|
|
349
|
+
region.setProperty(runtime, "latitude", event.region.latitude);
|
|
350
|
+
region.setProperty(runtime, "longitude", event.region.longitude);
|
|
351
|
+
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
|
|
352
|
+
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
|
|
353
|
+
payload.setProperty(runtime, "region", region);
|
|
354
354
|
}
|
|
355
|
-
|
|
356
|
-
return
|
|
355
|
+
payload.setProperty(runtime, "isGesture", event.isGesture);
|
|
356
|
+
return payload;
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
|
|
361
|
-
void RNMapsGoogleMapViewEventEmitter::onUserLocationChange(OnUserLocationChange
|
|
362
|
-
dispatchEvent("userLocationChange", [
|
|
363
|
-
auto
|
|
361
|
+
void RNMapsGoogleMapViewEventEmitter::onUserLocationChange(OnUserLocationChange event) const {
|
|
362
|
+
dispatchEvent("userLocationChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
363
|
+
auto payload = jsi::Object(runtime);
|
|
364
364
|
{
|
|
365
365
|
auto coordinate = jsi::Object(runtime);
|
|
366
|
-
coordinate.setProperty(runtime, "latitude",
|
|
367
|
-
coordinate.setProperty(runtime, "longitude",
|
|
368
|
-
coordinate.setProperty(runtime, "altitude",
|
|
369
|
-
coordinate.setProperty(runtime, "timestamp",
|
|
370
|
-
coordinate.setProperty(runtime, "accuracy",
|
|
371
|
-
coordinate.setProperty(runtime, "speed",
|
|
372
|
-
coordinate.setProperty(runtime, "heading",
|
|
373
|
-
coordinate.setProperty(runtime, "altitudeAccuracy",
|
|
374
|
-
coordinate.setProperty(runtime, "isFromMockProvider",
|
|
375
|
-
|
|
366
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
367
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
368
|
+
coordinate.setProperty(runtime, "altitude", event.coordinate.altitude);
|
|
369
|
+
coordinate.setProperty(runtime, "timestamp", event.coordinate.timestamp);
|
|
370
|
+
coordinate.setProperty(runtime, "accuracy", event.coordinate.accuracy);
|
|
371
|
+
coordinate.setProperty(runtime, "speed", event.coordinate.speed);
|
|
372
|
+
coordinate.setProperty(runtime, "heading", event.coordinate.heading);
|
|
373
|
+
coordinate.setProperty(runtime, "altitudeAccuracy", event.coordinate.altitudeAccuracy);
|
|
374
|
+
coordinate.setProperty(runtime, "isFromMockProvider", event.coordinate.isFromMockProvider);
|
|
375
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
376
376
|
}
|
|
377
377
|
{
|
|
378
378
|
auto error = jsi::Object(runtime);
|
|
379
|
-
error.setProperty(runtime, "message",
|
|
380
|
-
|
|
379
|
+
error.setProperty(runtime, "message", event.error.message);
|
|
380
|
+
payload.setProperty(runtime, "error", error);
|
|
381
381
|
}
|
|
382
|
-
return
|
|
382
|
+
return payload;
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
|
|
387
|
-
void RNMapsGooglePolygonEventEmitter::onPress(OnPress
|
|
388
|
-
dispatchEvent("press", [
|
|
389
|
-
auto
|
|
390
|
-
|
|
391
|
-
|
|
387
|
+
void RNMapsGooglePolygonEventEmitter::onPress(OnPress event) const {
|
|
388
|
+
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
389
|
+
auto payload = jsi::Object(runtime);
|
|
390
|
+
payload.setProperty(runtime, "action", event.action);
|
|
391
|
+
payload.setProperty(runtime, "id", event.id);
|
|
392
392
|
{
|
|
393
393
|
auto coordinate = jsi::Object(runtime);
|
|
394
|
-
coordinate.setProperty(runtime, "latitude",
|
|
395
|
-
coordinate.setProperty(runtime, "longitude",
|
|
396
|
-
|
|
394
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
395
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
396
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
397
397
|
}
|
|
398
398
|
{
|
|
399
399
|
auto position = jsi::Object(runtime);
|
|
400
|
-
position.setProperty(runtime, "x",
|
|
401
|
-
position.setProperty(runtime, "y",
|
|
402
|
-
|
|
400
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
401
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
402
|
+
payload.setProperty(runtime, "position", position);
|
|
403
403
|
}
|
|
404
|
-
return
|
|
404
|
+
return payload;
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
|
|
409
|
-
void RNMapsMapViewEventEmitter::onCalloutPress(OnCalloutPress
|
|
410
|
-
dispatchEvent("calloutPress", [
|
|
411
|
-
auto
|
|
412
|
-
|
|
409
|
+
void RNMapsMapViewEventEmitter::onCalloutPress(OnCalloutPress event) const {
|
|
410
|
+
dispatchEvent("calloutPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
411
|
+
auto payload = jsi::Object(runtime);
|
|
412
|
+
payload.setProperty(runtime, "action", event.action);
|
|
413
413
|
{
|
|
414
414
|
auto frame = jsi::Object(runtime);
|
|
415
|
-
frame.setProperty(runtime, "x",
|
|
416
|
-
frame.setProperty(runtime, "y",
|
|
417
|
-
frame.setProperty(runtime, "width",
|
|
418
|
-
frame.setProperty(runtime, "height",
|
|
419
|
-
|
|
415
|
+
frame.setProperty(runtime, "x", event.frame.x);
|
|
416
|
+
frame.setProperty(runtime, "y", event.frame.y);
|
|
417
|
+
frame.setProperty(runtime, "width", event.frame.width);
|
|
418
|
+
frame.setProperty(runtime, "height", event.frame.height);
|
|
419
|
+
payload.setProperty(runtime, "frame", frame);
|
|
420
420
|
}
|
|
421
|
-
|
|
421
|
+
payload.setProperty(runtime, "id", event.id);
|
|
422
422
|
{
|
|
423
423
|
auto point = jsi::Object(runtime);
|
|
424
|
-
point.setProperty(runtime, "x",
|
|
425
|
-
point.setProperty(runtime, "y",
|
|
426
|
-
|
|
424
|
+
point.setProperty(runtime, "x", event.point.x);
|
|
425
|
+
point.setProperty(runtime, "y", event.point.y);
|
|
426
|
+
payload.setProperty(runtime, "point", point);
|
|
427
427
|
}
|
|
428
428
|
{
|
|
429
429
|
auto coordinate = jsi::Object(runtime);
|
|
430
|
-
coordinate.setProperty(runtime, "latitude",
|
|
431
|
-
coordinate.setProperty(runtime, "longitude",
|
|
432
|
-
|
|
430
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
431
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
432
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
433
433
|
}
|
|
434
434
|
{
|
|
435
435
|
auto position = jsi::Object(runtime);
|
|
436
|
-
position.setProperty(runtime, "x",
|
|
437
|
-
position.setProperty(runtime, "y",
|
|
438
|
-
|
|
436
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
437
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
438
|
+
payload.setProperty(runtime, "position", position);
|
|
439
439
|
}
|
|
440
|
-
return
|
|
440
|
+
return payload;
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
|
|
445
|
-
void RNMapsMapViewEventEmitter::onDoublePress(OnDoublePress
|
|
446
|
-
dispatchEvent("doublePress", [
|
|
447
|
-
auto
|
|
445
|
+
void RNMapsMapViewEventEmitter::onDoublePress(OnDoublePress event) const {
|
|
446
|
+
dispatchEvent("doublePress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
447
|
+
auto payload = jsi::Object(runtime);
|
|
448
448
|
{
|
|
449
449
|
auto coordinate = jsi::Object(runtime);
|
|
450
|
-
coordinate.setProperty(runtime, "latitude",
|
|
451
|
-
coordinate.setProperty(runtime, "longitude",
|
|
452
|
-
|
|
450
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
451
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
452
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
453
453
|
}
|
|
454
454
|
{
|
|
455
455
|
auto position = jsi::Object(runtime);
|
|
456
|
-
position.setProperty(runtime, "x",
|
|
457
|
-
position.setProperty(runtime, "y",
|
|
458
|
-
|
|
456
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
457
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
458
|
+
payload.setProperty(runtime, "position", position);
|
|
459
459
|
}
|
|
460
|
-
return
|
|
460
|
+
return payload;
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
|
|
465
|
-
void RNMapsMapViewEventEmitter::onIndoorBuildingFocused(OnIndoorBuildingFocused
|
|
466
|
-
dispatchEvent("indoorBuildingFocused", [
|
|
467
|
-
auto
|
|
465
|
+
void RNMapsMapViewEventEmitter::onIndoorBuildingFocused(OnIndoorBuildingFocused event) const {
|
|
466
|
+
dispatchEvent("indoorBuildingFocused", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
467
|
+
auto payload = jsi::Object(runtime);
|
|
468
468
|
{
|
|
469
469
|
auto IndoorBuilding = jsi::Object(runtime);
|
|
470
|
-
IndoorBuilding.setProperty(runtime, "underground",
|
|
471
|
-
IndoorBuilding.setProperty(runtime, "activeLevelIndex",
|
|
472
|
-
|
|
470
|
+
IndoorBuilding.setProperty(runtime, "underground", event.IndoorBuilding.underground);
|
|
471
|
+
IndoorBuilding.setProperty(runtime, "activeLevelIndex", event.IndoorBuilding.activeLevelIndex);
|
|
472
|
+
payload.setProperty(runtime, "IndoorBuilding", IndoorBuilding);
|
|
473
473
|
}
|
|
474
|
-
return
|
|
474
|
+
return payload;
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
|
|
479
|
-
void RNMapsMapViewEventEmitter::onIndoorLevelActivated(OnIndoorLevelActivated
|
|
480
|
-
dispatchEvent("indoorLevelActivated", [
|
|
481
|
-
auto
|
|
479
|
+
void RNMapsMapViewEventEmitter::onIndoorLevelActivated(OnIndoorLevelActivated event) const {
|
|
480
|
+
dispatchEvent("indoorLevelActivated", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
481
|
+
auto payload = jsi::Object(runtime);
|
|
482
482
|
{
|
|
483
483
|
auto IndoorLevel = jsi::Object(runtime);
|
|
484
|
-
IndoorLevel.setProperty(runtime, "activeLevelIndex",
|
|
485
|
-
IndoorLevel.setProperty(runtime, "name",
|
|
486
|
-
IndoorLevel.setProperty(runtime, "shortName",
|
|
487
|
-
|
|
484
|
+
IndoorLevel.setProperty(runtime, "activeLevelIndex", event.IndoorLevel.activeLevelIndex);
|
|
485
|
+
IndoorLevel.setProperty(runtime, "name", event.IndoorLevel.name);
|
|
486
|
+
IndoorLevel.setProperty(runtime, "shortName", event.IndoorLevel.shortName);
|
|
487
|
+
payload.setProperty(runtime, "IndoorLevel", IndoorLevel);
|
|
488
488
|
}
|
|
489
|
-
return
|
|
489
|
+
return payload;
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
|
|
494
|
-
void RNMapsMapViewEventEmitter::onKmlReady(OnKmlReady
|
|
494
|
+
void RNMapsMapViewEventEmitter::onKmlReady(OnKmlReady event) const {
|
|
495
495
|
dispatchEvent("kmlReady", [](jsi::Runtime &runtime) {
|
|
496
|
-
auto
|
|
496
|
+
auto payload = jsi::Object(runtime);
|
|
497
497
|
|
|
498
|
-
return
|
|
498
|
+
return payload;
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
|
|
503
|
-
void RNMapsMapViewEventEmitter::onLongPress(OnLongPress
|
|
504
|
-
dispatchEvent("longPress", [
|
|
505
|
-
auto
|
|
503
|
+
void RNMapsMapViewEventEmitter::onLongPress(OnLongPress event) const {
|
|
504
|
+
dispatchEvent("longPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
505
|
+
auto payload = jsi::Object(runtime);
|
|
506
506
|
{
|
|
507
507
|
auto coordinate = jsi::Object(runtime);
|
|
508
|
-
coordinate.setProperty(runtime, "latitude",
|
|
509
|
-
coordinate.setProperty(runtime, "longitude",
|
|
510
|
-
|
|
508
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
509
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
510
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
511
511
|
}
|
|
512
512
|
{
|
|
513
513
|
auto position = jsi::Object(runtime);
|
|
514
|
-
position.setProperty(runtime, "x",
|
|
515
|
-
position.setProperty(runtime, "y",
|
|
516
|
-
|
|
514
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
515
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
516
|
+
payload.setProperty(runtime, "position", position);
|
|
517
517
|
}
|
|
518
|
-
|
|
519
|
-
return
|
|
518
|
+
payload.setProperty(runtime, "action", event.action);
|
|
519
|
+
return payload;
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
|
|
524
|
-
void RNMapsMapViewEventEmitter::onMapLoaded(OnMapLoaded
|
|
524
|
+
void RNMapsMapViewEventEmitter::onMapLoaded(OnMapLoaded event) const {
|
|
525
525
|
dispatchEvent("mapLoaded", [](jsi::Runtime &runtime) {
|
|
526
|
-
auto
|
|
526
|
+
auto payload = jsi::Object(runtime);
|
|
527
527
|
|
|
528
|
-
return
|
|
528
|
+
return payload;
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
|
|
533
|
-
void RNMapsMapViewEventEmitter::onMapReady(OnMapReady
|
|
533
|
+
void RNMapsMapViewEventEmitter::onMapReady(OnMapReady event) const {
|
|
534
534
|
dispatchEvent("mapReady", [](jsi::Runtime &runtime) {
|
|
535
|
-
auto
|
|
535
|
+
auto payload = jsi::Object(runtime);
|
|
536
536
|
|
|
537
|
-
return
|
|
537
|
+
return payload;
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
|
|
542
|
-
void RNMapsMapViewEventEmitter::onMarkerDeselect(OnMarkerDeselect
|
|
543
|
-
dispatchEvent("markerDeselect", [
|
|
544
|
-
auto
|
|
545
|
-
|
|
546
|
-
|
|
542
|
+
void RNMapsMapViewEventEmitter::onMarkerDeselect(OnMarkerDeselect event) const {
|
|
543
|
+
dispatchEvent("markerDeselect", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
544
|
+
auto payload = jsi::Object(runtime);
|
|
545
|
+
payload.setProperty(runtime, "action", event.action);
|
|
546
|
+
payload.setProperty(runtime, "id", event.id);
|
|
547
547
|
{
|
|
548
548
|
auto coordinate = jsi::Object(runtime);
|
|
549
|
-
coordinate.setProperty(runtime, "latitude",
|
|
550
|
-
coordinate.setProperty(runtime, "longitude",
|
|
551
|
-
|
|
549
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
550
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
551
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
552
552
|
}
|
|
553
|
-
return
|
|
553
|
+
return payload;
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
|
|
558
|
-
void RNMapsMapViewEventEmitter::onMarkerDrag(OnMarkerDrag
|
|
559
|
-
dispatchEvent("markerDrag", [
|
|
560
|
-
auto
|
|
558
|
+
void RNMapsMapViewEventEmitter::onMarkerDrag(OnMarkerDrag event) const {
|
|
559
|
+
dispatchEvent("markerDrag", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
560
|
+
auto payload = jsi::Object(runtime);
|
|
561
561
|
{
|
|
562
562
|
auto coordinate = jsi::Object(runtime);
|
|
563
|
-
coordinate.setProperty(runtime, "latitude",
|
|
564
|
-
coordinate.setProperty(runtime, "longitude",
|
|
565
|
-
|
|
563
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
564
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
565
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
566
566
|
}
|
|
567
567
|
{
|
|
568
568
|
auto position = jsi::Object(runtime);
|
|
569
|
-
position.setProperty(runtime, "x",
|
|
570
|
-
position.setProperty(runtime, "y",
|
|
571
|
-
|
|
569
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
570
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
571
|
+
payload.setProperty(runtime, "position", position);
|
|
572
572
|
}
|
|
573
|
-
|
|
574
|
-
return
|
|
573
|
+
payload.setProperty(runtime, "id", event.id);
|
|
574
|
+
return payload;
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
577
|
|
|
578
578
|
|
|
579
|
-
void RNMapsMapViewEventEmitter::onMarkerDragEnd(OnMarkerDragEnd
|
|
580
|
-
dispatchEvent("markerDragEnd", [
|
|
581
|
-
auto
|
|
579
|
+
void RNMapsMapViewEventEmitter::onMarkerDragEnd(OnMarkerDragEnd event) const {
|
|
580
|
+
dispatchEvent("markerDragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
581
|
+
auto payload = jsi::Object(runtime);
|
|
582
582
|
{
|
|
583
583
|
auto coordinate = jsi::Object(runtime);
|
|
584
|
-
coordinate.setProperty(runtime, "latitude",
|
|
585
|
-
coordinate.setProperty(runtime, "longitude",
|
|
586
|
-
|
|
584
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
585
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
586
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
587
587
|
}
|
|
588
|
-
|
|
588
|
+
payload.setProperty(runtime, "id", event.id);
|
|
589
589
|
{
|
|
590
590
|
auto position = jsi::Object(runtime);
|
|
591
|
-
position.setProperty(runtime, "x",
|
|
592
|
-
position.setProperty(runtime, "y",
|
|
593
|
-
|
|
591
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
592
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
593
|
+
payload.setProperty(runtime, "position", position);
|
|
594
594
|
}
|
|
595
|
-
return
|
|
595
|
+
return payload;
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
|
|
600
|
-
void RNMapsMapViewEventEmitter::onMarkerDragStart(OnMarkerDragStart
|
|
601
|
-
dispatchEvent("markerDragStart", [
|
|
602
|
-
auto
|
|
600
|
+
void RNMapsMapViewEventEmitter::onMarkerDragStart(OnMarkerDragStart event) const {
|
|
601
|
+
dispatchEvent("markerDragStart", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
602
|
+
auto payload = jsi::Object(runtime);
|
|
603
603
|
{
|
|
604
604
|
auto coordinate = jsi::Object(runtime);
|
|
605
|
-
coordinate.setProperty(runtime, "latitude",
|
|
606
|
-
coordinate.setProperty(runtime, "longitude",
|
|
607
|
-
|
|
605
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
606
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
607
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
608
608
|
}
|
|
609
|
-
|
|
609
|
+
payload.setProperty(runtime, "id", event.id);
|
|
610
610
|
{
|
|
611
611
|
auto position = jsi::Object(runtime);
|
|
612
|
-
position.setProperty(runtime, "x",
|
|
613
|
-
position.setProperty(runtime, "y",
|
|
614
|
-
|
|
612
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
613
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
614
|
+
payload.setProperty(runtime, "position", position);
|
|
615
615
|
}
|
|
616
|
-
return
|
|
616
|
+
return payload;
|
|
617
617
|
});
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
|
|
621
|
-
void RNMapsMapViewEventEmitter::onMarkerPress(OnMarkerPress
|
|
622
|
-
dispatchEvent("markerPress", [
|
|
623
|
-
auto
|
|
624
|
-
|
|
625
|
-
|
|
621
|
+
void RNMapsMapViewEventEmitter::onMarkerPress(OnMarkerPress event) const {
|
|
622
|
+
dispatchEvent("markerPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
623
|
+
auto payload = jsi::Object(runtime);
|
|
624
|
+
payload.setProperty(runtime, "action", event.action);
|
|
625
|
+
payload.setProperty(runtime, "id", event.id);
|
|
626
626
|
{
|
|
627
627
|
auto coordinate = jsi::Object(runtime);
|
|
628
|
-
coordinate.setProperty(runtime, "latitude",
|
|
629
|
-
coordinate.setProperty(runtime, "longitude",
|
|
630
|
-
|
|
628
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
629
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
630
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
631
631
|
}
|
|
632
632
|
{
|
|
633
633
|
auto position = jsi::Object(runtime);
|
|
634
|
-
position.setProperty(runtime, "x",
|
|
635
|
-
position.setProperty(runtime, "y",
|
|
636
|
-
|
|
634
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
635
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
636
|
+
payload.setProperty(runtime, "position", position);
|
|
637
637
|
}
|
|
638
|
-
return
|
|
638
|
+
return payload;
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
|
|
643
|
-
void RNMapsMapViewEventEmitter::onMarkerSelect(OnMarkerSelect
|
|
644
|
-
dispatchEvent("markerSelect", [
|
|
645
|
-
auto
|
|
646
|
-
|
|
647
|
-
|
|
643
|
+
void RNMapsMapViewEventEmitter::onMarkerSelect(OnMarkerSelect event) const {
|
|
644
|
+
dispatchEvent("markerSelect", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
645
|
+
auto payload = jsi::Object(runtime);
|
|
646
|
+
payload.setProperty(runtime, "action", event.action);
|
|
647
|
+
payload.setProperty(runtime, "id", event.id);
|
|
648
648
|
{
|
|
649
649
|
auto coordinate = jsi::Object(runtime);
|
|
650
|
-
coordinate.setProperty(runtime, "latitude",
|
|
651
|
-
coordinate.setProperty(runtime, "longitude",
|
|
652
|
-
|
|
650
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
651
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
652
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
653
653
|
}
|
|
654
|
-
return
|
|
654
|
+
return payload;
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
657
|
|
|
658
658
|
|
|
659
|
-
void RNMapsMapViewEventEmitter::onPanDrag(OnPanDrag
|
|
660
|
-
dispatchEvent("panDrag", [
|
|
661
|
-
auto
|
|
659
|
+
void RNMapsMapViewEventEmitter::onPanDrag(OnPanDrag event) const {
|
|
660
|
+
dispatchEvent("panDrag", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
661
|
+
auto payload = jsi::Object(runtime);
|
|
662
662
|
{
|
|
663
663
|
auto coordinate = jsi::Object(runtime);
|
|
664
|
-
coordinate.setProperty(runtime, "latitude",
|
|
665
|
-
coordinate.setProperty(runtime, "longitude",
|
|
666
|
-
|
|
664
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
665
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
666
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
667
667
|
}
|
|
668
668
|
{
|
|
669
669
|
auto position = jsi::Object(runtime);
|
|
670
|
-
position.setProperty(runtime, "x",
|
|
671
|
-
position.setProperty(runtime, "y",
|
|
672
|
-
|
|
670
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
671
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
672
|
+
payload.setProperty(runtime, "position", position);
|
|
673
673
|
}
|
|
674
|
-
return
|
|
674
|
+
return payload;
|
|
675
675
|
});
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
|
|
679
|
-
void RNMapsMapViewEventEmitter::onPoiClick(OnPoiClick
|
|
680
|
-
dispatchEvent("poiClick", [
|
|
681
|
-
auto
|
|
682
|
-
|
|
683
|
-
|
|
679
|
+
void RNMapsMapViewEventEmitter::onPoiClick(OnPoiClick event) const {
|
|
680
|
+
dispatchEvent("poiClick", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
681
|
+
auto payload = jsi::Object(runtime);
|
|
682
|
+
payload.setProperty(runtime, "placeId", event.placeId);
|
|
683
|
+
payload.setProperty(runtime, "name", event.name);
|
|
684
684
|
{
|
|
685
685
|
auto coordinate = jsi::Object(runtime);
|
|
686
|
-
coordinate.setProperty(runtime, "latitude",
|
|
687
|
-
coordinate.setProperty(runtime, "longitude",
|
|
688
|
-
|
|
686
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
687
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
688
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
689
689
|
}
|
|
690
690
|
{
|
|
691
691
|
auto position = jsi::Object(runtime);
|
|
692
|
-
position.setProperty(runtime, "x",
|
|
693
|
-
position.setProperty(runtime, "y",
|
|
694
|
-
|
|
692
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
693
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
694
|
+
payload.setProperty(runtime, "position", position);
|
|
695
695
|
}
|
|
696
|
-
return
|
|
696
|
+
return payload;
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
|
|
701
|
-
void RNMapsMapViewEventEmitter::onPress(OnPress
|
|
702
|
-
dispatchEvent("press", [
|
|
703
|
-
auto
|
|
701
|
+
void RNMapsMapViewEventEmitter::onPress(OnPress event) const {
|
|
702
|
+
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
703
|
+
auto payload = jsi::Object(runtime);
|
|
704
704
|
{
|
|
705
705
|
auto coordinate = jsi::Object(runtime);
|
|
706
|
-
coordinate.setProperty(runtime, "latitude",
|
|
707
|
-
coordinate.setProperty(runtime, "longitude",
|
|
708
|
-
|
|
706
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
707
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
708
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
709
709
|
}
|
|
710
710
|
{
|
|
711
711
|
auto position = jsi::Object(runtime);
|
|
712
|
-
position.setProperty(runtime, "x",
|
|
713
|
-
position.setProperty(runtime, "y",
|
|
714
|
-
|
|
712
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
713
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
714
|
+
payload.setProperty(runtime, "position", position);
|
|
715
715
|
}
|
|
716
|
-
|
|
717
|
-
return
|
|
716
|
+
payload.setProperty(runtime, "action", event.action);
|
|
717
|
+
return payload;
|
|
718
718
|
});
|
|
719
719
|
}
|
|
720
720
|
|
|
721
721
|
|
|
722
|
-
void RNMapsMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart
|
|
723
|
-
dispatchEvent("regionChangeStart", [
|
|
724
|
-
auto
|
|
722
|
+
void RNMapsMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart event) const {
|
|
723
|
+
dispatchEvent("regionChangeStart", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
724
|
+
auto payload = jsi::Object(runtime);
|
|
725
725
|
{
|
|
726
726
|
auto region = jsi::Object(runtime);
|
|
727
|
-
region.setProperty(runtime, "latitude",
|
|
728
|
-
region.setProperty(runtime, "longitude",
|
|
729
|
-
region.setProperty(runtime, "latitudeDelta",
|
|
730
|
-
region.setProperty(runtime, "longitudeDelta",
|
|
731
|
-
|
|
727
|
+
region.setProperty(runtime, "latitude", event.region.latitude);
|
|
728
|
+
region.setProperty(runtime, "longitude", event.region.longitude);
|
|
729
|
+
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
|
|
730
|
+
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
|
|
731
|
+
payload.setProperty(runtime, "region", region);
|
|
732
732
|
}
|
|
733
|
-
|
|
734
|
-
return
|
|
733
|
+
payload.setProperty(runtime, "isGesture", event.isGesture);
|
|
734
|
+
return payload;
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
737
|
|
|
738
738
|
|
|
739
|
-
void RNMapsMapViewEventEmitter::onRegionChange(OnRegionChange
|
|
740
|
-
dispatchEvent("regionChange", [
|
|
741
|
-
auto
|
|
739
|
+
void RNMapsMapViewEventEmitter::onRegionChange(OnRegionChange event) const {
|
|
740
|
+
dispatchEvent("regionChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
741
|
+
auto payload = jsi::Object(runtime);
|
|
742
742
|
{
|
|
743
743
|
auto region = jsi::Object(runtime);
|
|
744
|
-
region.setProperty(runtime, "latitude",
|
|
745
|
-
region.setProperty(runtime, "longitude",
|
|
746
|
-
region.setProperty(runtime, "latitudeDelta",
|
|
747
|
-
region.setProperty(runtime, "longitudeDelta",
|
|
748
|
-
|
|
744
|
+
region.setProperty(runtime, "latitude", event.region.latitude);
|
|
745
|
+
region.setProperty(runtime, "longitude", event.region.longitude);
|
|
746
|
+
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
|
|
747
|
+
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
|
|
748
|
+
payload.setProperty(runtime, "region", region);
|
|
749
749
|
}
|
|
750
|
-
|
|
751
|
-
return
|
|
750
|
+
payload.setProperty(runtime, "isGesture", event.isGesture);
|
|
751
|
+
return payload;
|
|
752
752
|
});
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
|
|
756
|
-
void RNMapsMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete
|
|
757
|
-
dispatchEvent("regionChangeComplete", [
|
|
758
|
-
auto
|
|
756
|
+
void RNMapsMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete event) const {
|
|
757
|
+
dispatchEvent("regionChangeComplete", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
758
|
+
auto payload = jsi::Object(runtime);
|
|
759
759
|
{
|
|
760
760
|
auto region = jsi::Object(runtime);
|
|
761
|
-
region.setProperty(runtime, "latitude",
|
|
762
|
-
region.setProperty(runtime, "longitude",
|
|
763
|
-
region.setProperty(runtime, "latitudeDelta",
|
|
764
|
-
region.setProperty(runtime, "longitudeDelta",
|
|
765
|
-
|
|
761
|
+
region.setProperty(runtime, "latitude", event.region.latitude);
|
|
762
|
+
region.setProperty(runtime, "longitude", event.region.longitude);
|
|
763
|
+
region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
|
|
764
|
+
region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
|
|
765
|
+
payload.setProperty(runtime, "region", region);
|
|
766
766
|
}
|
|
767
|
-
|
|
768
|
-
return
|
|
767
|
+
payload.setProperty(runtime, "isGesture", event.isGesture);
|
|
768
|
+
return payload;
|
|
769
769
|
});
|
|
770
770
|
}
|
|
771
771
|
|
|
772
772
|
|
|
773
|
-
void RNMapsMapViewEventEmitter::onUserLocationChange(OnUserLocationChange
|
|
774
|
-
dispatchEvent("userLocationChange", [
|
|
775
|
-
auto
|
|
773
|
+
void RNMapsMapViewEventEmitter::onUserLocationChange(OnUserLocationChange event) const {
|
|
774
|
+
dispatchEvent("userLocationChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
775
|
+
auto payload = jsi::Object(runtime);
|
|
776
776
|
{
|
|
777
777
|
auto coordinate = jsi::Object(runtime);
|
|
778
|
-
coordinate.setProperty(runtime, "latitude",
|
|
779
|
-
coordinate.setProperty(runtime, "longitude",
|
|
780
|
-
coordinate.setProperty(runtime, "altitude",
|
|
781
|
-
coordinate.setProperty(runtime, "timestamp",
|
|
782
|
-
coordinate.setProperty(runtime, "accuracy",
|
|
783
|
-
coordinate.setProperty(runtime, "speed",
|
|
784
|
-
coordinate.setProperty(runtime, "heading",
|
|
785
|
-
coordinate.setProperty(runtime, "altitudeAccuracy",
|
|
786
|
-
coordinate.setProperty(runtime, "isFromMockProvider",
|
|
787
|
-
|
|
778
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
779
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
780
|
+
coordinate.setProperty(runtime, "altitude", event.coordinate.altitude);
|
|
781
|
+
coordinate.setProperty(runtime, "timestamp", event.coordinate.timestamp);
|
|
782
|
+
coordinate.setProperty(runtime, "accuracy", event.coordinate.accuracy);
|
|
783
|
+
coordinate.setProperty(runtime, "speed", event.coordinate.speed);
|
|
784
|
+
coordinate.setProperty(runtime, "heading", event.coordinate.heading);
|
|
785
|
+
coordinate.setProperty(runtime, "altitudeAccuracy", event.coordinate.altitudeAccuracy);
|
|
786
|
+
coordinate.setProperty(runtime, "isFromMockProvider", event.coordinate.isFromMockProvider);
|
|
787
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
788
788
|
}
|
|
789
789
|
{
|
|
790
790
|
auto error = jsi::Object(runtime);
|
|
791
|
-
error.setProperty(runtime, "message",
|
|
792
|
-
|
|
791
|
+
error.setProperty(runtime, "message", event.error.message);
|
|
792
|
+
payload.setProperty(runtime, "error", error);
|
|
793
793
|
}
|
|
794
|
-
return
|
|
794
|
+
return payload;
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
797
|
|
|
798
798
|
|
|
799
|
-
void RNMapsMarkerEventEmitter::onCalloutPress(OnCalloutPress
|
|
800
|
-
dispatchEvent("calloutPress", [
|
|
801
|
-
auto
|
|
802
|
-
|
|
803
|
-
|
|
799
|
+
void RNMapsMarkerEventEmitter::onCalloutPress(OnCalloutPress event) const {
|
|
800
|
+
dispatchEvent("calloutPress", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
801
|
+
auto payload = jsi::Object(runtime);
|
|
802
|
+
payload.setProperty(runtime, "action", event.action);
|
|
803
|
+
payload.setProperty(runtime, "id", event.id);
|
|
804
804
|
{
|
|
805
805
|
auto frame = jsi::Object(runtime);
|
|
806
|
-
frame.setProperty(runtime, "x",
|
|
807
|
-
frame.setProperty(runtime, "y",
|
|
808
|
-
frame.setProperty(runtime, "width",
|
|
809
|
-
frame.setProperty(runtime, "height",
|
|
810
|
-
|
|
806
|
+
frame.setProperty(runtime, "x", event.frame.x);
|
|
807
|
+
frame.setProperty(runtime, "y", event.frame.y);
|
|
808
|
+
frame.setProperty(runtime, "width", event.frame.width);
|
|
809
|
+
frame.setProperty(runtime, "height", event.frame.height);
|
|
810
|
+
payload.setProperty(runtime, "frame", frame);
|
|
811
811
|
}
|
|
812
812
|
{
|
|
813
813
|
auto point = jsi::Object(runtime);
|
|
814
|
-
point.setProperty(runtime, "x",
|
|
815
|
-
point.setProperty(runtime, "y",
|
|
816
|
-
|
|
814
|
+
point.setProperty(runtime, "x", event.point.x);
|
|
815
|
+
point.setProperty(runtime, "y", event.point.y);
|
|
816
|
+
payload.setProperty(runtime, "point", point);
|
|
817
817
|
}
|
|
818
|
-
return
|
|
818
|
+
return payload;
|
|
819
819
|
});
|
|
820
820
|
}
|
|
821
821
|
|
|
822
822
|
|
|
823
|
-
void RNMapsMarkerEventEmitter::onDeselect(OnDeselect
|
|
824
|
-
dispatchEvent("deselect", [
|
|
825
|
-
auto
|
|
826
|
-
|
|
827
|
-
|
|
823
|
+
void RNMapsMarkerEventEmitter::onDeselect(OnDeselect event) const {
|
|
824
|
+
dispatchEvent("deselect", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
825
|
+
auto payload = jsi::Object(runtime);
|
|
826
|
+
payload.setProperty(runtime, "action", event.action);
|
|
827
|
+
payload.setProperty(runtime, "id", event.id);
|
|
828
828
|
{
|
|
829
829
|
auto coordinate = jsi::Object(runtime);
|
|
830
|
-
coordinate.setProperty(runtime, "latitude",
|
|
831
|
-
coordinate.setProperty(runtime, "longitude",
|
|
832
|
-
|
|
830
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
831
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
832
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
833
833
|
}
|
|
834
834
|
{
|
|
835
835
|
auto position = jsi::Object(runtime);
|
|
836
|
-
position.setProperty(runtime, "x",
|
|
837
|
-
position.setProperty(runtime, "y",
|
|
838
|
-
|
|
836
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
837
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
838
|
+
payload.setProperty(runtime, "position", position);
|
|
839
839
|
}
|
|
840
|
-
return
|
|
840
|
+
return payload;
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
843
|
|
|
844
844
|
|
|
845
|
-
void RNMapsMarkerEventEmitter::onDrag(OnDrag
|
|
846
|
-
dispatchEvent("drag", [
|
|
847
|
-
auto
|
|
848
|
-
|
|
845
|
+
void RNMapsMarkerEventEmitter::onDrag(OnDrag event) const {
|
|
846
|
+
dispatchEvent("drag", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
847
|
+
auto payload = jsi::Object(runtime);
|
|
848
|
+
payload.setProperty(runtime, "id", event.id);
|
|
849
849
|
{
|
|
850
850
|
auto coordinate = jsi::Object(runtime);
|
|
851
|
-
coordinate.setProperty(runtime, "latitude",
|
|
852
|
-
coordinate.setProperty(runtime, "longitude",
|
|
853
|
-
|
|
851
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
852
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
853
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
854
854
|
}
|
|
855
|
-
return
|
|
855
|
+
return payload;
|
|
856
856
|
});
|
|
857
857
|
}
|
|
858
858
|
|
|
859
859
|
|
|
860
|
-
void RNMapsMarkerEventEmitter::onDragEnd(OnDragEnd
|
|
861
|
-
dispatchEvent("dragEnd", [
|
|
862
|
-
auto
|
|
863
|
-
|
|
860
|
+
void RNMapsMarkerEventEmitter::onDragEnd(OnDragEnd event) const {
|
|
861
|
+
dispatchEvent("dragEnd", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
862
|
+
auto payload = jsi::Object(runtime);
|
|
863
|
+
payload.setProperty(runtime, "id", event.id);
|
|
864
864
|
{
|
|
865
865
|
auto coordinate = jsi::Object(runtime);
|
|
866
|
-
coordinate.setProperty(runtime, "latitude",
|
|
867
|
-
coordinate.setProperty(runtime, "longitude",
|
|
868
|
-
|
|
866
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
867
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
868
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
869
869
|
}
|
|
870
|
-
return
|
|
870
|
+
return payload;
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
|
|
875
|
-
void RNMapsMarkerEventEmitter::onDragStart(OnDragStart
|
|
876
|
-
dispatchEvent("dragStart", [
|
|
877
|
-
auto
|
|
878
|
-
|
|
875
|
+
void RNMapsMarkerEventEmitter::onDragStart(OnDragStart event) const {
|
|
876
|
+
dispatchEvent("dragStart", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
877
|
+
auto payload = jsi::Object(runtime);
|
|
878
|
+
payload.setProperty(runtime, "id", event.id);
|
|
879
879
|
{
|
|
880
880
|
auto coordinate = jsi::Object(runtime);
|
|
881
|
-
coordinate.setProperty(runtime, "latitude",
|
|
882
|
-
coordinate.setProperty(runtime, "longitude",
|
|
883
|
-
|
|
881
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
882
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
883
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
884
884
|
}
|
|
885
|
-
return
|
|
885
|
+
return payload;
|
|
886
886
|
});
|
|
887
887
|
}
|
|
888
888
|
|
|
889
889
|
|
|
890
|
-
void RNMapsMarkerEventEmitter::onPress(OnPress
|
|
891
|
-
dispatchEvent("press", [
|
|
892
|
-
auto
|
|
893
|
-
|
|
894
|
-
|
|
890
|
+
void RNMapsMarkerEventEmitter::onPress(OnPress event) const {
|
|
891
|
+
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
892
|
+
auto payload = jsi::Object(runtime);
|
|
893
|
+
payload.setProperty(runtime, "action", event.action);
|
|
894
|
+
payload.setProperty(runtime, "id", event.id);
|
|
895
895
|
{
|
|
896
896
|
auto coordinate = jsi::Object(runtime);
|
|
897
|
-
coordinate.setProperty(runtime, "latitude",
|
|
898
|
-
coordinate.setProperty(runtime, "longitude",
|
|
899
|
-
|
|
897
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
898
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
899
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
900
900
|
}
|
|
901
901
|
{
|
|
902
902
|
auto position = jsi::Object(runtime);
|
|
903
|
-
position.setProperty(runtime, "x",
|
|
904
|
-
position.setProperty(runtime, "y",
|
|
905
|
-
|
|
903
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
904
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
905
|
+
payload.setProperty(runtime, "position", position);
|
|
906
906
|
}
|
|
907
|
-
return
|
|
907
|
+
return payload;
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
910
|
|
|
911
911
|
|
|
912
|
-
void RNMapsMarkerEventEmitter::onSelect(OnSelect
|
|
913
|
-
dispatchEvent("select", [
|
|
914
|
-
auto
|
|
915
|
-
|
|
916
|
-
|
|
912
|
+
void RNMapsMarkerEventEmitter::onSelect(OnSelect event) const {
|
|
913
|
+
dispatchEvent("select", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
914
|
+
auto payload = jsi::Object(runtime);
|
|
915
|
+
payload.setProperty(runtime, "action", event.action);
|
|
916
|
+
payload.setProperty(runtime, "id", event.id);
|
|
917
917
|
{
|
|
918
918
|
auto coordinate = jsi::Object(runtime);
|
|
919
|
-
coordinate.setProperty(runtime, "latitude",
|
|
920
|
-
coordinate.setProperty(runtime, "longitude",
|
|
921
|
-
|
|
919
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
920
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
921
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
922
922
|
}
|
|
923
923
|
{
|
|
924
924
|
auto position = jsi::Object(runtime);
|
|
925
|
-
position.setProperty(runtime, "x",
|
|
926
|
-
position.setProperty(runtime, "y",
|
|
927
|
-
|
|
925
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
926
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
927
|
+
payload.setProperty(runtime, "position", position);
|
|
928
928
|
}
|
|
929
|
-
return
|
|
929
|
+
return payload;
|
|
930
930
|
});
|
|
931
931
|
}
|
|
932
932
|
|
|
933
933
|
|
|
934
|
-
void RNMapsOverlayEventEmitter::onPress(OnPress
|
|
935
|
-
dispatchEvent("press", [
|
|
936
|
-
auto
|
|
937
|
-
|
|
938
|
-
|
|
934
|
+
void RNMapsOverlayEventEmitter::onPress(OnPress event) const {
|
|
935
|
+
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
936
|
+
auto payload = jsi::Object(runtime);
|
|
937
|
+
payload.setProperty(runtime, "action", event.action);
|
|
938
|
+
payload.setProperty(runtime, "id", event.id);
|
|
939
939
|
{
|
|
940
940
|
auto coordinate = jsi::Object(runtime);
|
|
941
|
-
coordinate.setProperty(runtime, "latitude",
|
|
942
|
-
coordinate.setProperty(runtime, "longitude",
|
|
943
|
-
|
|
941
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
942
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
943
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
944
944
|
}
|
|
945
945
|
{
|
|
946
946
|
auto position = jsi::Object(runtime);
|
|
947
|
-
position.setProperty(runtime, "x",
|
|
948
|
-
position.setProperty(runtime, "y",
|
|
949
|
-
|
|
947
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
948
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
949
|
+
payload.setProperty(runtime, "position", position);
|
|
950
950
|
}
|
|
951
|
-
return
|
|
951
|
+
return payload;
|
|
952
952
|
});
|
|
953
953
|
}
|
|
954
954
|
|
|
955
955
|
|
|
956
|
-
void RNMapsPolylineEventEmitter::onPress(OnPress
|
|
957
|
-
dispatchEvent("press", [
|
|
958
|
-
auto
|
|
959
|
-
|
|
960
|
-
|
|
956
|
+
void RNMapsPolylineEventEmitter::onPress(OnPress event) const {
|
|
957
|
+
dispatchEvent("press", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
958
|
+
auto payload = jsi::Object(runtime);
|
|
959
|
+
payload.setProperty(runtime, "action", event.action);
|
|
960
|
+
payload.setProperty(runtime, "id", event.id);
|
|
961
961
|
{
|
|
962
962
|
auto coordinate = jsi::Object(runtime);
|
|
963
|
-
coordinate.setProperty(runtime, "latitude",
|
|
964
|
-
coordinate.setProperty(runtime, "longitude",
|
|
965
|
-
|
|
963
|
+
coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
|
|
964
|
+
coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
|
|
965
|
+
payload.setProperty(runtime, "coordinate", coordinate);
|
|
966
966
|
}
|
|
967
967
|
{
|
|
968
968
|
auto position = jsi::Object(runtime);
|
|
969
|
-
position.setProperty(runtime, "x",
|
|
970
|
-
position.setProperty(runtime, "y",
|
|
971
|
-
|
|
969
|
+
position.setProperty(runtime, "x", event.position.x);
|
|
970
|
+
position.setProperty(runtime, "y", event.position.y);
|
|
971
|
+
payload.setProperty(runtime, "position", position);
|
|
972
972
|
}
|
|
973
|
-
return
|
|
973
|
+
return payload;
|
|
974
974
|
});
|
|
975
975
|
}
|
|
976
976
|
|