Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »

It’s possible to get notified about interaction with POI on the map. You can use NMMapView’s instance method - (void)addPlaceTapListener to add a listener and - (void)removeMapTapListener to remove it. The listener must implement NMPlaceTapListener interface. Multiple listeners can be added to NMMapView instance.

Example:

//anObject's class conforms to NMPlaceTapListener protocol
[mapView addPlaceTapListener:anObject];

Optional protocol methods provide a way to notify listener:

- (void)onPlacesSingleTap:(NSArray<NMPlace *>*)places {
//define single tap gesture behaviour here
}

- (void)onPlacesDoubleTap:(NSArray<NMPlace *>*)places; {
//define double tap gesture behaviour here
}

- (void)onPlacesLongTap:(NSArray<NMPlace *>*)places; {
//define long press gesture behaviour here
}

The places argument will contain the list of all places around the tapped point.

  • No labels