react-native-google-maps-plus 1.2.0 → 1.3.0-dev.2

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 (58) hide show
  1. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +57 -8
  2. package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +13 -3
  3. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +29 -4
  4. package/android/src/main/java/com/rngooglemapsplus/extensions/IndoorBuildingExtension.kt +33 -0
  5. package/ios/GoogleMapViewImpl.swift +61 -14
  6. package/ios/MapMarkerBuilder.swift +17 -8
  7. package/ios/RNGoogleMapsPlusView.swift +19 -4
  8. package/ios/extensions/IndoorBuilding+Extension.swift +33 -0
  9. package/lib/module/types.js.map +1 -1
  10. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +10 -5
  11. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
  12. package/lib/typescript/src/types.d.ts +18 -0
  13. package/lib/typescript/src/types.d.ts.map +1 -1
  14. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +8 -2
  15. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorBuilding.hpp +81 -0
  16. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorLevel.hpp +78 -0
  17. package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__string_.hpp +76 -0
  18. package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__string__RNLatLng.hpp +78 -0
  19. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +143 -37
  20. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +18 -8
  21. package/nitrogen/generated/android/c++/JRNIndoorBuilding.hpp +86 -0
  22. package/nitrogen/generated/android/c++/JRNIndoorLevel.hpp +66 -0
  23. package/nitrogen/generated/android/c++/JRNMarker.hpp +24 -0
  24. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +20 -0
  25. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNIndoorBuilding.kt +81 -0
  26. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNIndoorLevel.kt +81 -0
  27. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/{Func_void_std__string.kt → Func_void_std__optional_std__string_.kt} +12 -12
  28. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_std__optional_std__string__RNLatLng.kt +81 -0
  29. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +82 -12
  30. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorBuilding.kt +38 -0
  31. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorLevel.kt +38 -0
  32. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +18 -0
  33. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +28 -4
  34. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +146 -18
  35. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +6 -0
  36. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +49 -8
  37. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +25 -0
  38. package/nitrogen/generated/ios/swift/Func_void_RNIndoorBuilding.swift +47 -0
  39. package/nitrogen/generated/ios/swift/{Func_void_std__string.swift → Func_void_RNIndoorLevel.swift} +11 -11
  40. package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string_.swift +54 -0
  41. package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string__RNLatLng.swift +54 -0
  42. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +9 -4
  43. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +250 -48
  44. package/nitrogen/generated/ios/swift/RNIndoorBuilding.swift +116 -0
  45. package/nitrogen/generated/ios/swift/RNIndoorLevel.swift +118 -0
  46. package/nitrogen/generated/ios/swift/RNMarker.swift +153 -1
  47. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +10 -0
  48. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +24 -8
  49. package/nitrogen/generated/shared/c++/RNIndoorBuilding.hpp +82 -0
  50. package/nitrogen/generated/shared/c++/RNIndoorLevel.hpp +80 -0
  51. package/nitrogen/generated/shared/c++/RNMarker.hpp +25 -1
  52. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +68 -8
  53. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +11 -4
  54. package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +5 -0
  55. package/package.json +1 -1
  56. package/src/RNGoogleMapsPlusView.nitro.ts +11 -4
  57. package/src/types.ts +20 -0
  58. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +0 -75
@@ -42,11 +42,17 @@ namespace margelo::nitro::rngooglemapsplus {
42
42
  std::optional<double> zIndex SWIFT_PRIVATE;
43
43
  RNLatLng coordinate SWIFT_PRIVATE;
44
44
  std::optional<RNPosition> anchor SWIFT_PRIVATE;
45
+ std::optional<bool> showInfoWindow SWIFT_PRIVATE;
46
+ std::optional<std::string> title SWIFT_PRIVATE;
47
+ std::optional<std::string> snippet SWIFT_PRIVATE;
48
+ std::optional<double> opacity SWIFT_PRIVATE;
49
+ std::optional<bool> flat SWIFT_PRIVATE;
50
+ std::optional<bool> draggable SWIFT_PRIVATE;
45
51
  std::optional<RNMarkerSvg> iconSvg SWIFT_PRIVATE;
46
52
 
47
53
  public:
48
54
  RNMarker() = default;
49
- explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, std::optional<RNMarkerSvg> iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), iconSvg(iconSvg) {}
55
+ explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, std::optional<bool> showInfoWindow, std::optional<std::string> title, std::optional<std::string> snippet, std::optional<double> opacity, std::optional<bool> flat, std::optional<bool> draggable, std::optional<RNMarkerSvg> iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), showInfoWindow(showInfoWindow), title(title), snippet(snippet), opacity(opacity), flat(flat), draggable(draggable), iconSvg(iconSvg) {}
50
56
  };
51
57
 
52
58
  } // namespace margelo::nitro::rngooglemapsplus
@@ -63,6 +69,12 @@ namespace margelo::nitro {
63
69
  JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
64
70
  JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "coordinate")),
65
71
  JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::fromJSI(runtime, obj.getProperty(runtime, "anchor")),
72
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "showInfoWindow")),
73
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "title")),
74
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "snippet")),
75
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "opacity")),
76
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "flat")),
77
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "draggable")),
66
78
  JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
67
79
  );
68
80
  }
@@ -72,6 +84,12 @@ namespace margelo::nitro {
72
84
  obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
73
85
  obj.setProperty(runtime, "coordinate", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.coordinate));
74
86
  obj.setProperty(runtime, "anchor", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::toJSI(runtime, arg.anchor));
87
+ obj.setProperty(runtime, "showInfoWindow", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.showInfoWindow));
88
+ obj.setProperty(runtime, "title", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.title));
89
+ obj.setProperty(runtime, "snippet", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.snippet));
90
+ obj.setProperty(runtime, "opacity", JSIConverter<std::optional<double>>::toJSI(runtime, arg.opacity));
91
+ obj.setProperty(runtime, "flat", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.flat));
92
+ obj.setProperty(runtime, "draggable", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.draggable));
75
93
  obj.setProperty(runtime, "iconSvg", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::toJSI(runtime, arg.iconSvg));
76
94
  return obj;
77
95
  }
@@ -84,6 +102,12 @@ namespace margelo::nitro {
84
102
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
85
103
  if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "coordinate"))) return false;
86
104
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::canConvert(runtime, obj.getProperty(runtime, "anchor"))) return false;
105
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "showInfoWindow"))) return false;
106
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "title"))) return false;
107
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "snippet"))) return false;
108
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "opacity"))) return false;
109
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "flat"))) return false;
110
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "draggable"))) return false;
87
111
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
88
112
  return true;
89
113
  }
@@ -255,46 +255,96 @@ namespace margelo::nitro::rngooglemapsplus::views {
255
255
  throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapPress: ") + exc.what());
256
256
  }
257
257
  }()),
258
- onMarkerPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
258
+ onMarkerPress([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> {
259
259
  try {
260
260
  const react::RawValue* rawValue = rawProps.at("onMarkerPress", nullptr, nullptr);
261
261
  if (rawValue == nullptr) return sourceProps.onMarkerPress;
262
262
  const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
263
- return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerPress);
263
+ return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerPress);
264
264
  } catch (const std::exception& exc) {
265
265
  throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerPress: ") + exc.what());
266
266
  }
267
267
  }()),
268
- onPolylinePress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
268
+ onPolylinePress([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> {
269
269
  try {
270
270
  const react::RawValue* rawValue = rawProps.at("onPolylinePress", nullptr, nullptr);
271
271
  if (rawValue == nullptr) return sourceProps.onPolylinePress;
272
272
  const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
273
- return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onPolylinePress);
273
+ return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onPolylinePress);
274
274
  } catch (const std::exception& exc) {
275
275
  throw std::runtime_error(std::string("RNGoogleMapsPlusView.onPolylinePress: ") + exc.what());
276
276
  }
277
277
  }()),
278
- onPolygonPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
278
+ onPolygonPress([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> {
279
279
  try {
280
280
  const react::RawValue* rawValue = rawProps.at("onPolygonPress", nullptr, nullptr);
281
281
  if (rawValue == nullptr) return sourceProps.onPolygonPress;
282
282
  const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
283
- return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onPolygonPress);
283
+ return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onPolygonPress);
284
284
  } catch (const std::exception& exc) {
285
285
  throw std::runtime_error(std::string("RNGoogleMapsPlusView.onPolygonPress: ") + exc.what());
286
286
  }
287
287
  }()),
288
- onCirclePress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
288
+ onCirclePress([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> {
289
289
  try {
290
290
  const react::RawValue* rawValue = rawProps.at("onCirclePress", nullptr, nullptr);
291
291
  if (rawValue == nullptr) return sourceProps.onCirclePress;
292
292
  const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
293
- return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onCirclePress);
293
+ return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onCirclePress);
294
294
  } catch (const std::exception& exc) {
295
295
  throw std::runtime_error(std::string("RNGoogleMapsPlusView.onCirclePress: ") + exc.what());
296
296
  }
297
297
  }()),
298
+ onMarkerDragStart([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> {
299
+ try {
300
+ const react::RawValue* rawValue = rawProps.at("onMarkerDragStart", nullptr, nullptr);
301
+ if (rawValue == nullptr) return sourceProps.onMarkerDragStart;
302
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
303
+ return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerDragStart);
304
+ } catch (const std::exception& exc) {
305
+ throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDragStart: ") + exc.what());
306
+ }
307
+ }()),
308
+ onMarkerDrag([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> {
309
+ try {
310
+ const react::RawValue* rawValue = rawProps.at("onMarkerDrag", nullptr, nullptr);
311
+ if (rawValue == nullptr) return sourceProps.onMarkerDrag;
312
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
313
+ return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerDrag);
314
+ } catch (const std::exception& exc) {
315
+ throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDrag: ") + exc.what());
316
+ }
317
+ }()),
318
+ onMarkerDragEnd([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> {
319
+ try {
320
+ const react::RawValue* rawValue = rawProps.at("onMarkerDragEnd", nullptr, nullptr);
321
+ if (rawValue == nullptr) return sourceProps.onMarkerDragEnd;
322
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
323
+ return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerDragEnd);
324
+ } catch (const std::exception& exc) {
325
+ throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDragEnd: ") + exc.what());
326
+ }
327
+ }()),
328
+ onIndoorBuildingFocused([&]() -> CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>> {
329
+ try {
330
+ const react::RawValue* rawValue = rawProps.at("onIndoorBuildingFocused", nullptr, nullptr);
331
+ if (rawValue == nullptr) return sourceProps.onIndoorBuildingFocused;
332
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
333
+ return CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onIndoorBuildingFocused);
334
+ } catch (const std::exception& exc) {
335
+ throw std::runtime_error(std::string("RNGoogleMapsPlusView.onIndoorBuildingFocused: ") + exc.what());
336
+ }
337
+ }()),
338
+ onIndoorLevelActivated([&]() -> CachedProp<std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>> {
339
+ try {
340
+ const react::RawValue* rawValue = rawProps.at("onIndoorLevelActivated", nullptr, nullptr);
341
+ if (rawValue == nullptr) return sourceProps.onIndoorLevelActivated;
342
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
343
+ return CachedProp<std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onIndoorLevelActivated);
344
+ } catch (const std::exception& exc) {
345
+ throw std::runtime_error(std::string("RNGoogleMapsPlusView.onIndoorLevelActivated: ") + exc.what());
346
+ }
347
+ }()),
298
348
  onCameraChangeStart([&]() -> CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> {
299
349
  try {
300
350
  const react::RawValue* rawValue = rawProps.at("onCameraChangeStart", nullptr, nullptr);
@@ -365,6 +415,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
365
415
  onPolylinePress(other.onPolylinePress),
366
416
  onPolygonPress(other.onPolygonPress),
367
417
  onCirclePress(other.onCirclePress),
418
+ onMarkerDragStart(other.onMarkerDragStart),
419
+ onMarkerDrag(other.onMarkerDrag),
420
+ onMarkerDragEnd(other.onMarkerDragEnd),
421
+ onIndoorBuildingFocused(other.onIndoorBuildingFocused),
422
+ onIndoorLevelActivated(other.onIndoorLevelActivated),
368
423
  onCameraChangeStart(other.onCameraChangeStart),
369
424
  onCameraChange(other.onCameraChange),
370
425
  onCameraChangeComplete(other.onCameraChangeComplete),
@@ -399,6 +454,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
399
454
  case hashString("onPolylinePress"): return true;
400
455
  case hashString("onPolygonPress"): return true;
401
456
  case hashString("onCirclePress"): return true;
457
+ case hashString("onMarkerDragStart"): return true;
458
+ case hashString("onMarkerDrag"): return true;
459
+ case hashString("onMarkerDragEnd"): return true;
460
+ case hashString("onIndoorBuildingFocused"): return true;
461
+ case hashString("onIndoorLevelActivated"): return true;
402
462
  case hashString("onCameraChangeStart"): return true;
403
463
  case hashString("onCameraChange"): return true;
404
464
  case hashString("onCameraChangeComplete"): return true;
@@ -37,6 +37,8 @@
37
37
  #include "RNLocation.hpp"
38
38
  #include "RNLocationErrorCode.hpp"
39
39
  #include "RNLatLng.hpp"
40
+ #include "RNIndoorBuilding.hpp"
41
+ #include "RNIndoorLevel.hpp"
40
42
  #include "RNRegion.hpp"
41
43
  #include "RNCamera.hpp"
42
44
  #include <memory>
@@ -86,10 +88,15 @@ namespace margelo::nitro::rngooglemapsplus::views {
86
88
  CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> onLocationUpdate;
87
89
  CachedProp<std::optional<std::function<void(RNLocationErrorCode /* error */)>>> onLocationError;
88
90
  CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> onMapPress;
89
- CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onMarkerPress;
90
- CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onPolylinePress;
91
- CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onPolygonPress;
92
- CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onCirclePress;
91
+ CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onMarkerPress;
92
+ CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onPolylinePress;
93
+ CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onPolygonPress;
94
+ CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onCirclePress;
95
+ CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> onMarkerDragStart;
96
+ CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> onMarkerDrag;
97
+ CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> onMarkerDragEnd;
98
+ CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>> onIndoorBuildingFocused;
99
+ CachedProp<std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>> onIndoorLevelActivated;
93
100
  CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeStart;
94
101
  CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChange;
95
102
  CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeComplete;
@@ -31,6 +31,11 @@
31
31
  "onPolylinePress": true,
32
32
  "onPolygonPress": true,
33
33
  "onCirclePress": true,
34
+ "onMarkerDragStart": true,
35
+ "onMarkerDrag": true,
36
+ "onMarkerDragEnd": true,
37
+ "onIndoorBuildingFocused": true,
38
+ "onIndoorLevelActivated": true,
34
39
  "onCameraChangeStart": true,
35
40
  "onCameraChange": true,
36
41
  "onCameraChangeComplete": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.2.0",
3
+ "version": "1.3.0-dev.2",
4
4
  "description": "React-native wrapper for android & IOS google maps sdk",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -24,6 +24,8 @@ import type {
24
24
  RNMapZoomConfig,
25
25
  RNHeatmap,
26
26
  RNKMLayer,
27
+ RNIndoorBuilding,
28
+ RNIndoorLevel,
27
29
  } from './types';
28
30
 
29
31
  export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
@@ -50,10 +52,15 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
50
52
  onLocationUpdate?: (location: RNLocation) => void;
51
53
  onLocationError?: (error: RNLocationErrorCode) => void;
52
54
  onMapPress?: (coordinate: RNLatLng) => void;
53
- onMarkerPress?: (id: string) => void;
54
- onPolylinePress?: (id: string) => void;
55
- onPolygonPress?: (id: string) => void;
56
- onCirclePress?: (id: string) => void;
55
+ onMarkerPress?: (id?: string | undefined) => void;
56
+ onPolylinePress?: (id?: string | undefined) => void;
57
+ onPolygonPress?: (id?: string | undefined) => void;
58
+ onCirclePress?: (id?: string | undefined) => void;
59
+ onMarkerDragStart?: (id: string | undefined, location: RNLatLng) => void;
60
+ onMarkerDrag?: (id: string | undefined, location: RNLatLng) => void;
61
+ onMarkerDragEnd?: (id: string | undefined, location: RNLatLng) => void;
62
+ onIndoorBuildingFocused?: (indoorBuilding: RNIndoorBuilding) => void;
63
+ onIndoorLevelActivated?: (indoorLevel: RNIndoorLevel) => void;
57
64
  onCameraChangeStart?: (
58
65
  region: RNRegion,
59
66
  camera: RNCamera,
package/src/types.ts CHANGED
@@ -136,6 +136,12 @@ export type RNMarker = {
136
136
  zIndex?: number;
137
137
  coordinate: RNLatLng;
138
138
  anchor?: RNPosition;
139
+ showInfoWindow?: boolean;
140
+ title?: string;
141
+ snippet?: string;
142
+ opacity?: number;
143
+ flat?: boolean;
144
+ draggable?: boolean;
139
145
  iconSvg?: RNMarkerSvg;
140
146
  };
141
147
 
@@ -204,6 +210,20 @@ export type RNKMLayer = {
204
210
  kmlString: string;
205
211
  };
206
212
 
213
+ export type RNIndoorBuilding = {
214
+ activeLevelIndex?: number;
215
+ defaultLevelIndex?: number;
216
+ levels: RNIndoorLevel[];
217
+ underground?: boolean;
218
+ };
219
+
220
+ export type RNIndoorLevel = {
221
+ index: number;
222
+ name?: string;
223
+ shortName?: string;
224
+ active?: boolean;
225
+ };
226
+
207
227
  export type RNLocationConfig = {
208
228
  android?: RNAndroidLocationConfig;
209
229
  ios?: RNIOSLocationConfig;
@@ -1,75 +0,0 @@
1
- ///
2
- /// JFunc_void_std__string.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2025 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #include <fbjni/fbjni.h>
11
- #include <functional>
12
-
13
- #include <string>
14
- #include <functional>
15
-
16
- namespace margelo::nitro::rngooglemapsplus {
17
-
18
- using namespace facebook;
19
-
20
- /**
21
- * Represents the Java/Kotlin callback `(id: String) -> Unit`.
22
- * This can be passed around between C++ and Java/Kotlin.
23
- */
24
- struct JFunc_void_std__string: public jni::JavaClass<JFunc_void_std__string> {
25
- public:
26
- static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__string;";
27
-
28
- public:
29
- /**
30
- * Invokes the function this `JFunc_void_std__string` instance holds through JNI.
31
- */
32
- void invoke(const std::string& id) const {
33
- static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* id */)>("invoke");
34
- method(self(), jni::make_jstring(id));
35
- }
36
- };
37
-
38
- /**
39
- * An implementation of Func_void_std__string that is backed by a C++ implementation (using `std::function<...>`)
40
- */
41
- struct JFunc_void_std__string_cxx final: public jni::HybridClass<JFunc_void_std__string_cxx, JFunc_void_std__string> {
42
- public:
43
- static jni::local_ref<JFunc_void_std__string::javaobject> fromCpp(const std::function<void(const std::string& /* id */)>& func) {
44
- return JFunc_void_std__string_cxx::newObjectCxxArgs(func);
45
- }
46
-
47
- public:
48
- /**
49
- * Invokes the C++ `std::function<...>` this `JFunc_void_std__string_cxx` instance holds.
50
- */
51
- void invoke_cxx(jni::alias_ref<jni::JString> id) {
52
- _func(id->toStdString());
53
- }
54
-
55
- public:
56
- [[nodiscard]]
57
- inline const std::function<void(const std::string& /* id */)>& getFunction() const {
58
- return _func;
59
- }
60
-
61
- public:
62
- static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__string_cxx;";
63
- static void registerNatives() {
64
- registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_std__string_cxx::invoke_cxx)});
65
- }
66
-
67
- private:
68
- explicit JFunc_void_std__string_cxx(const std::function<void(const std::string& /* id */)>& func): _func(func) { }
69
-
70
- private:
71
- friend HybridBase;
72
- std::function<void(const std::string& /* id */)> _func;
73
- };
74
-
75
- } // namespace margelo::nitro::rngooglemapsplus