From 1449b186149537dbce7a296d766b5fab1a692017 Mon Sep 17 00:00:00 2001 From: hansemannn Date: Mon, 11 Mar 2019 23:50:39 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20add=20=E2=80=9Epoiclick=E2=80=9C=20even?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Classes/TiGooglemapsView.m | 13 +++++++++++++ README.md | 1 + manifest | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Classes/TiGooglemapsView.m b/Classes/TiGooglemapsView.m index c31f894..1634706 100644 --- a/Classes/TiGooglemapsView.m +++ b/Classes/TiGooglemapsView.m @@ -259,6 +259,19 @@ - (void)mapView:(GMSMapView *)mapView didTapOverlay:(GMSOverlay *)overlay } } +- (void)mapView:(GMSMapView *)mapView didTapPOIWithPlaceID:(NSString *)placeID name:(NSString *)name location:(CLLocationCoordinate2D)location +{ + if ([[self proxy] _hasListeners:@"poiclick"]) { + NSDictionary *event = @{ + @"placeID" : placeID, + @"name": name, + @"latitude" : @(location.latitude), + @"longitude" : @(location.longitude) + }; + [[self proxy] fireEvent:@"poiclick" withObject:event]; + } +} + - (void)mapView:(GMSMapView *)mapView didBeginDraggingMarker:(GMSMarker *)marker { if ([[self proxy] _hasListeners:@"dragstart"]) { diff --git a/README.md b/README.md index 7a597fe..36b31b6 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ The module supports all native delegates - exposed as events. These are: - [x] mapclick - [x] locationclick - [x] longclick +- [x] poiclick - [x] regionchanged - [x] regionwillchange - [x] idle diff --git a/manifest b/manifest index 47cd681..43a4567 100644 --- a/manifest +++ b/manifest @@ -2,7 +2,7 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 4.1.0 +version: 4.2.0 apiversion: 2 architectures: armv7 arm64 i386 x86_64 description: ti.googlemaps