Closed de1mat closed 6 years ago
In the README it says:
The module supports all native delegates - exposed as events. These are: click (map, pin, infoWindow, overlay) locationclick longpress ...
The module supports all native delegates - exposed as events. These are:
click (map, pin, infoWindow, overlay) locationclick longpress ...
After testing this multiple times with no luck I downloaded the module source code and discovered that it is in fact firing longclick not longpress.
longclick
longpress
- (void)mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { if ([[self proxy] _hasListeners:@"longclick"]) { [[self proxy] fireEvent:@"longclick" withObject:@{ @"map" : [self proxy], @"latitude" : NUMDOUBLE(coordinate.latitude), @"longitude" : NUMDOUBLE(coordinate.longitude) }]; } }
PS: This needs to be corrected in the app.js example as well which currently has mapView.addEventListener('longpress', handleLongpressEvent);
mapView.addEventListener('longpress', handleLongpressEvent);
Fixed, thanks!
Awesome 👍
Don't forget about app.js :)
https://github.com/hansemannn/titanium-googlemaps/blob/master/example/app.js#L143
In the README it says:
After testing this multiple times with no luck I downloaded the module source code and discovered that it is in fact firing
longclick
notlongpress
.PS: This needs to be corrected in the app.js example as well which currently has
mapView.addEventListener('longpress', handleLongpressEvent);