|
1 | 1 | import { Color, EventData, ImageSource, Utils, View } from '@nativescript/core';
|
2 | 2 | import { isNullOrUndefined } from '@nativescript/core/utils/types';
|
3 |
| -import { ActiveBuildingEvent, ActiveLevelEvent, CameraPositionEvent, CameraPositionStartEvent, CircleOptions, Coordinate, CoordinateBounds, GroundOverlayOptions, GroundOverlayTapEvent, ICameraPosition, ICameraUpdate, ICircle, IGoogleMap, IGroundOverlay, IIndoorBuilding, IIndoorLevel, IMarker, InfoWindowEvent, IPatternItem, ICap, IPoi, IPolygon, IPolyline, IProjection, ITileOverlay, ITileProvider, IUISettings, IVisibleRegion, MapTapEvent, MarkerDragEvent, MarkerInfoEvent, MarkerOptions, MarkerTapEvent, PoiTapEvent, PolygonOptions, PolylineOptions, Style, TileOverlayOptions } from '.'; |
| 3 | +import { ActiveBuildingEvent, ActiveLevelEvent, CameraPositionEvent, CameraPositionStartEvent, CircleOptions, Coordinate, CoordinateBounds, GroundOverlayOptions, CircleTapEvent, PolygonTapEvent, PolylineTapEvent, GroundOverlayTapEvent, ICameraPosition, ICameraUpdate, ICircle, IGoogleMap, IGroundOverlay, IIndoorBuilding, IIndoorLevel, IMarker, InfoWindowEvent, IPatternItem, ICap, IPoi, IPolygon, IPolyline, IProjection, ITileOverlay, ITileProvider, IUISettings, IVisibleRegion, MapTapEvent, MarkerDragEvent, MarkerInfoEvent, MarkerOptions, MarkerTapEvent, PoiTapEvent, PolygonOptions, PolylineOptions, Style, TileOverlayOptions } from '.'; |
4 | 4 | import { bearingProperty, JointType, latProperty, lngProperty, MapType, MapViewBase, tiltProperty, zoomProperty } from './common';
|
5 | 5 | import { deserialize, intoNativeCircleOptions, intoNativeGroundOverlayOptions, intoNativeMarkerOptions, intoNativePolygonOptions, intoNativePolylineOptions, serialize } from './utils';
|
6 | 6 |
|
@@ -298,7 +298,25 @@ class GMSMapViewDelegateImpl extends NSObject implements GMSMapViewDelegate {
|
298 | 298 | }
|
299 | 299 |
|
300 | 300 | mapViewDidTapOverlay(mapView: GMSMapView, overlay: GMSOverlay): void {
|
301 |
| - if (overlay instanceof GMSGroundOverlay) { |
| 301 | + if (overlay instanceof GMSCircle) { |
| 302 | + this._owner?.get?.().notify?.(<CircleTapEvent>{ |
| 303 | + eventName: MapView.circleTapEvent, |
| 304 | + object: this._owner?.get?.(), |
| 305 | + circle: Circle.fromNative(overlay), |
| 306 | + }); |
| 307 | + } else if (overlay instanceof GMSPolygon) { |
| 308 | + this._owner?.get?.().notify?.(<PolygonTapEvent>{ |
| 309 | + eventName: MapView.polygonTapEvent, |
| 310 | + object: this._owner?.get?.(), |
| 311 | + polygon: Polygon.fromNative(overlay), |
| 312 | + }); |
| 313 | + } else if (overlay instanceof GMSPolyline) { |
| 314 | + this._owner?.get?.().notify?.(<PolylineTapEvent>{ |
| 315 | + eventName: MapView.polylineTapEvent, |
| 316 | + object: this._owner?.get?.(), |
| 317 | + polyline: Polyline.fromNative(overlay), |
| 318 | + }); |
| 319 | + } else if (overlay instanceof GMSGroundOverlay) { |
302 | 320 | this._owner?.get?.().notify?.(<GroundOverlayTapEvent>{
|
303 | 321 | eventName: MapView.groundOverlayTapEvent,
|
304 | 322 | object: this._owner?.get?.(),
|
|
0 commit comments