Skip to content

Commit

Permalink
feat: add „poiclick“ event
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Mar 11, 2019
1 parent 389dd76 commit 1449b18
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Classes/TiGooglemapsView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"]) {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1449b18

Please sign in to comment.