From edf74bc3079ee600de204ebaedf53fac9e30cfc7 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Fri, 23 Oct 2026 14:59:28 +0900 Subject: [PATCH 1/2] [google_maps_flutter] Add POI tap support - Separate POI taps from map taps and update the example. - Bump to 0.3.1 with interface 2.17.0 and example 2.19.0. - Test POI display on Tizen 10.1/11.0 using a local fixture. Live Google Maps testing still requires an API key. --- packages/google_maps_flutter/CHANGELOG.md | 6 ++++++ packages/google_maps_flutter/README.md | 4 ++-- .../example/lib/heatmap.dart | 1 + .../example/lib/lite_mode.dart | 1 + .../example/lib/map_click.dart | 18 ++++++++++++++++++ .../example/lib/map_coordinates.dart | 1 + .../example/lib/map_map_id.dart | 1 + .../example/lib/padding.dart | 1 + .../google_maps_flutter/example/pubspec.yaml | 8 ++++---- .../lib/src/google_maps_controller.dart | 5 +++++ .../lib/src/google_maps_flutter_tizen.dart | 5 +++++ packages/google_maps_flutter/pubspec.yaml | 4 ++-- 12 files changed, 47 insertions(+), 8 deletions(-) diff --git a/packages/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/CHANGELOG.md index 1bd301926..84b31770b 100644 --- a/packages/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.3.1 + +* Update google_maps_flutter to 2.19.0. +* Update google_maps_flutter_platform_interface to 2.17.0. +* Add support for POI tap events. + ## 0.3.0 * Update `webview_flutter_lwe` to ^0.6.0. diff --git a/packages/google_maps_flutter/README.md b/packages/google_maps_flutter/README.md index bc360b151..569d1aecc 100644 --- a/packages/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/README.md @@ -20,8 +20,8 @@ This package is not an _endorsed_ implementation of `google_maps_flutter`. There ```yaml dependencies: - google_maps_flutter: ^2.18.0 - google_maps_flutter_tizen: ^0.3.0 + google_maps_flutter: ^2.19.0 + google_maps_flutter_tizen: ^0.3.1 ``` For detailed usage, see https://pub.dev/packages/google_maps_flutter#sample-usage. diff --git a/packages/google_maps_flutter/example/lib/heatmap.dart b/packages/google_maps_flutter/example/lib/heatmap.dart index 2772a097a..b4e08aeb8 100644 --- a/packages/google_maps_flutter/example/lib/heatmap.dart +++ b/packages/google_maps_flutter/example/lib/heatmap.dart @@ -7,6 +7,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; + import 'page.dart'; class HeatmapPage extends GoogleMapExampleAppPage { diff --git a/packages/google_maps_flutter/example/lib/lite_mode.dart b/packages/google_maps_flutter/example/lib/lite_mode.dart index 6b182e432..d0d2bce79 100644 --- a/packages/google_maps_flutter/example/lib/lite_mode.dart +++ b/packages/google_maps_flutter/example/lib/lite_mode.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; + import 'page.dart'; const CameraPosition _kInitialPosition = CameraPosition( diff --git a/packages/google_maps_flutter/example/lib/map_click.dart b/packages/google_maps_flutter/example/lib/map_click.dart index 96813d0c6..353b75439 100644 --- a/packages/google_maps_flutter/example/lib/map_click.dart +++ b/packages/google_maps_flutter/example/lib/map_click.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; + import 'page.dart'; const CameraPosition _kInitialPosition = CameraPosition( @@ -35,6 +36,7 @@ class _MapClickBodyState extends State<_MapClickBody> { GoogleMapController? mapController; LatLng? _lastTap; LatLng? _lastLongPress; + String? _lastPointOfInterestPlaceId; @override Widget build(BuildContext context) { @@ -51,6 +53,11 @@ class _MapClickBodyState extends State<_MapClickBody> { _lastLongPress = pos; }); }, + onPointOfInterestTap: (PointOfInterestId pointOfInterestId) { + setState(() { + _lastPointOfInterestPlaceId = pointOfInterestId.value; + }); + }, ); final columnChildren = [ @@ -73,6 +80,17 @@ class _MapClickBodyState extends State<_MapClickBody> { child: Text(_lastLongPress != null ? 'Long pressed' : '', textAlign: TextAlign.center), ), ); + final lastPointOfInterestTap = + 'Point of interest place ID:\n${_lastPointOfInterestPlaceId ?? ""}'; + columnChildren.add(Center(child: Text(lastPointOfInterestTap, textAlign: TextAlign.center))); + columnChildren.add( + Center( + child: Text( + _lastPointOfInterestPlaceId != null ? 'Point of interest tapped' : '', + textAlign: TextAlign.center, + ), + ), + ); } return Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: columnChildren); } diff --git a/packages/google_maps_flutter/example/lib/map_coordinates.dart b/packages/google_maps_flutter/example/lib/map_coordinates.dart index 8b1ded165..28cd1b4b2 100644 --- a/packages/google_maps_flutter/example/lib/map_coordinates.dart +++ b/packages/google_maps_flutter/example/lib/map_coordinates.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; + import 'page.dart'; const CameraPosition _kInitialPosition = CameraPosition( diff --git a/packages/google_maps_flutter/example/lib/map_map_id.dart b/packages/google_maps_flutter/example/lib/map_map_id.dart index 592c2251c..e85d4d00b 100644 --- a/packages/google_maps_flutter/example/lib/map_map_id.dart +++ b/packages/google_maps_flutter/example/lib/map_map_id.dart @@ -5,6 +5,7 @@ // ignore_for_file: public_member_api_docs import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; + import 'page.dart'; class MapIdPage extends GoogleMapExampleAppPage { diff --git a/packages/google_maps_flutter/example/lib/padding.dart b/packages/google_maps_flutter/example/lib/padding.dart index d1e29430f..2400f9f22 100644 --- a/packages/google_maps_flutter/example/lib/padding.dart +++ b/packages/google_maps_flutter/example/lib/padding.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; + import 'page.dart'; class PaddingPage extends GoogleMapExampleAppPage { diff --git a/packages/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/example/pubspec.yaml index 906d714dc..84775b315 100644 --- a/packages/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/example/pubspec.yaml @@ -3,14 +3,14 @@ description: Demonstrates how to use the google_maps_flutter_tizen plugin. publish_to: "none" environment: - sdk: ^3.10.0 - flutter: ">=3.38.0" + sdk: ^3.13.0 + flutter: ">=3.47.0" dependencies: flutter: sdk: flutter - google_maps_flutter: ^2.18.0 - google_maps_flutter_platform_interface: ^2.16.0 + google_maps_flutter: ^2.19.0 + google_maps_flutter_platform_interface: ^2.17.0 google_maps_flutter_tizen: path: ../ diff --git a/packages/google_maps_flutter/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/lib/src/google_maps_controller.dart index 0fabc520a..403242e93 100644 --- a/packages/google_maps_flutter/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/lib/src/google_maps_controller.dart @@ -236,6 +236,11 @@ class GoogleMapsController { try { final dynamic event = json.decode(message); if (event is Map) { + final placeId = event['placeId'] as String?; + if (placeId != null) { + _streamController.add(PointOfInterestTapEvent(_mapId, PointOfInterestId(placeId))); + return; + } assert(event['latLng'] != null); final position = LatLng(event['latLng']['lat'] as double, event['latLng']['lng'] as double); _streamController.add(MapTapEvent(_mapId, position)); diff --git a/packages/google_maps_flutter/lib/src/google_maps_flutter_tizen.dart b/packages/google_maps_flutter/lib/src/google_maps_flutter_tizen.dart index 7b439cf8f..f72907980 100644 --- a/packages/google_maps_flutter/lib/src/google_maps_flutter_tizen.dart +++ b/packages/google_maps_flutter/lib/src/google_maps_flutter_tizen.dart @@ -251,6 +251,11 @@ class GoogleMapsPlugin extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } + @override + Stream onPointOfInterestTap({required int mapId}) { + return _events(mapId).whereType(); + } + @override Stream onLongPress({required int mapId}) { return _events(mapId).whereType(); diff --git a/packages/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/pubspec.yaml index 06cbba114..fe9ba10cc 100644 --- a/packages/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_tizen description: Tizen implementation of the google_maps_flutter plugin. homepage: https://github.com/flutter-tizen/plugins repository: https://github.com/flutter-tizen/plugins/tree/main/packages/google_maps_flutter -version: 0.3.0 +version: 0.3.1 environment: sdk: ^3.10.0 @@ -18,7 +18,7 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.16.0 + google_maps_flutter_platform_interface: ^2.17.0 stream_transform: ^2.0.0 webview_flutter: ^4.13.1 webview_flutter_lwe: ^0.6.0 From a7b4fda4d680de4587f0b1806438d2decd41e3fb Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Wed, 4 Nov 2026 20:22:40 +0900 Subject: [PATCH 2/2] [google_maps_flutter] Suppress the default POI info window Tapping a POI icon makes Maps JS open its place info window, which the web engine cannot render (Shadow DOM manual slot assignment) and crashes on before the tap event reaches the app. Call stop() on POI click events so the info window is never opened and only the PointOfInterestTapEvent is delivered. --- .../google_maps_flutter/lib/src/google_maps_js_bridge.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/lib/src/google_maps_js_bridge.dart b/packages/google_maps_flutter/lib/src/google_maps_js_bridge.dart index c81d9ee6c..3e7483d59 100644 --- a/packages/google_maps_flutter/lib/src/google_maps_js_bridge.dart +++ b/packages/google_maps_flutter/lib/src/google_maps_js_bridge.dart @@ -198,7 +198,10 @@ class GoogleMapsJsBridge { map = new google.maps.Map(document.getElementById('map'), $optionsJs); map.addListener('bounds_changed', (event) => { BoundChanged.postMessage(''); }); map.addListener('idle', (event) => { Idle.postMessage(''); }); - map.addListener('click', (event) => { Click.postMessage(JSON.stringify(event)); }); + map.addListener('click', (event) => { + if (event.placeId) { event.stop(); } + Click.postMessage(JSON.stringify(event)); + }); map.addListener('tilesloaded', (evnet) => { Tilesloaded.postMessage(''); }); let longPressTimeout;