Skip to content

Commit 3c48de5

Browse files
authored
feat: support POI click events (#564)
1 parent bf1c220 commit 3c48de5

File tree

19 files changed

+808
-252
lines changed

19 files changed

+808
-252
lines changed

android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsBaseMapView.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,17 @@ abstract class GoogleMapsBaseMapView(
243243
_consumeMyLocationButtonClickEventsEnabled
244244
}
245245

246+
getMap().setOnPoiClickListener { pointOfInterest ->
247+
viewEventApi?.onPoiClick(
248+
getViewId().toLong(),
249+
PointOfInterestDto(
250+
placeId = pointOfInterest.placeId,
251+
name = pointOfInterest.name,
252+
latLng = LatLngDto(pointOfInterest.latLng.latitude, pointOfInterest.latLng.longitude),
253+
),
254+
) {}
255+
}
256+
246257
getMap()
247258
.setOnFollowMyLocationCallback(
248259
object : GoogleMap.OnCameraFollowLocationCallback {

0 commit comments

Comments
 (0)