react-native-maps 1.21.0-alpha.49 → 1.21.0-alpha.50

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