react-native-maps 1.21.0-alpha.46 → 1.21.0-alpha.47

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.
@@ -274,6 +274,35 @@ using namespace facebook::react;
274
274
  mapViewEventEmitter->onUserLocationChange(data);
275
275
  }
276
276
  };
277
+
278
+ _view.onPoiClick = [self](NSDictionary* dictionary) {
279
+ if (_eventEmitter) {
280
+
281
+ NSDictionary* coordinateDict = dictionary[@"coordinate"];
282
+ NSDictionary* positionDict = dictionary[@"position"];
283
+
284
+ // Populate the OnMapPressCoordinate struct
285
+ facebook::react::RNMapsGoogleMapViewEventEmitter::OnPoiClickCoordinate coordinate = {
286
+ .latitude = [coordinateDict[@"latitude"] doubleValue],
287
+ .longitude = [coordinateDict[@"longitude"] doubleValue],
288
+ };
289
+ // Populate the OnMapDouplePressPosition struct
290
+ facebook::react::RNMapsGoogleMapViewEventEmitter::OnPoiClickPosition position = {
291
+ .x = [positionDict[@"x"] doubleValue],
292
+ .y = [positionDict[@"y"] doubleValue],
293
+ };
294
+
295
+
296
+ auto mapViewEventEmitter = std::static_pointer_cast<RNMapsGoogleMapViewEventEmitter const>(_eventEmitter);
297
+ facebook::react::RNMapsGoogleMapViewEventEmitter::OnPoiClick data = {
298
+ .coordinate = coordinate,
299
+ .position = position,
300
+ .placeId = [dictionary[@"placeId"] UTF8String],
301
+ .name = [dictionary[@"name"] UTF8String],
302
+ };
303
+ mapViewEventEmitter->onPoiClick(data);
304
+ }
305
+ };
277
306
 
278
307
 
279
308
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "main": "lib/index.js",
6
6
  "author": "Leland Richardson <leland.m.richardson@gmail.com>",
7
7
  "homepage": "https://github.com/react-native-maps/react-native-maps#readme",
8
- "version": "1.21.0-alpha.46",
8
+ "version": "1.21.0-alpha.47",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",