README says Map event is "longpress" but it is in fact "longclick"
de1mat opened this issue · comments
Matt Delmarter commented
In the README it says:
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
.
- (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);
Hans Knöchel commented
Fixed, thanks!
Matt Delmarter commented
Awesome 👍
Don't forget about app.js :)
https://github.com/hansemannn/titanium-googlemaps/blob/master/example/app.js#L143