Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions packages/google_maps_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions packages/google_maps_flutter/example/lib/heatmap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions packages/google_maps_flutter/example/lib/lite_mode.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
18 changes: 18 additions & 0 deletions packages/google_maps_flutter/example/lib/map_click.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -35,6 +36,7 @@ class _MapClickBodyState extends State<_MapClickBody> {
GoogleMapController? mapController;
LatLng? _lastTap;
LatLng? _lastLongPress;
String? _lastPointOfInterestPlaceId;

@override
Widget build(BuildContext context) {
Expand All @@ -51,6 +53,11 @@ class _MapClickBodyState extends State<_MapClickBody> {
_lastLongPress = pos;
});
},
onPointOfInterestTap: (PointOfInterestId pointOfInterestId) {
setState(() {
_lastPointOfInterestPlaceId = pointOfInterestId.value;
});
},
);

final columnChildren = <Widget>[
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions packages/google_maps_flutter/example/lib/map_map_id.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions packages/google_maps_flutter/example/lib/padding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions packages/google_maps_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ../

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ class GoogleMapsController {
try {
final dynamic event = json.decode(message);
if (event is Map<String, dynamic>) {
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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ class GoogleMapsPlugin extends GoogleMapsFlutterPlatform {
return _events(mapId).whereType<MapTapEvent>();
}

@override
Stream<PointOfInterestTapEvent> onPointOfInterestTap({required int mapId}) {
return _events(mapId).whereType<PointOfInterestTapEvent>();
}

@override
Stream<MapLongPressEvent> onLongPress({required int mapId}) {
return _events(mapId).whereType<MapLongPressEvent>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/google_maps_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Comment thread
JSUYA marked this conversation as resolved.
Resolved
stream_transform: ^2.0.0
webview_flutter: ^4.13.1
webview_flutter_lwe: ^0.6.0