From fddae8522911acf4de9f8ab98b5e2a492f0394dd Mon Sep 17 00:00:00 2001 From: "Aswin.K.V" Date: Sun, 3 May 2020 21:11:34 +0530 Subject: [PATCH 1/4] polyline id counter initial value set to 0 --- .../google_maps_flutter/example/lib/place_polyline.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart index 0c9da634faa7..a7c6de4a8c6c 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart @@ -32,7 +32,7 @@ class PlacePolylineBodyState extends State { GoogleMapController controller; Map polylines = {}; - int _polylineIdCounter = 1; + int _polylineIdCounter = 0; PolylineId selectedPolyline; // Values when toggling polyline color From 579a77381b5fb297caddda715fd315393cbbb162 Mon Sep 17 00:00:00 2001 From: "Aswin.K.V" Date: Mon, 4 May 2020 23:15:38 +0530 Subject: [PATCH 2/4] changed version and updated changelog. --- packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md | 4 ++++ packages/google_maps_flutter/google_maps_flutter/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index 7f47917268eb..a55be2aac720 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.27+1 + +* Fix in example app to properly place polyline at initial camera position. + ## 0.5.27 * Migrate the core plugin to use `google_maps_flutter_platform_interface` APIs. diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 89fd66a0197e..ee130cf51d6f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -1,7 +1,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter/google_maps_flutter -version: 0.5.27 +version: 0.5.27+1 dependencies: flutter: From e8b5f95437fcf2b7780ff38e1de9c544d903f08a Mon Sep 17 00:00:00 2001 From: "Aswin.K.V" Date: Mon, 4 May 2020 23:25:01 +0530 Subject: [PATCH 3/4] changed initial camera postion to show full polyline. --- .../google_maps_flutter/example/lib/place_polyline.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart index a7c6de4a8c6c..837c8f7a1d05 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart @@ -214,7 +214,7 @@ class PlacePolylineBodyState extends State { height: 300.0, child: GoogleMap( initialCameraPosition: const CameraPosition( - target: LatLng(52.4478, -3.5402), + target: LatLng(53.1721, -3.5402), zoom: 7.0, ), polylines: Set.of(polylines.values), @@ -297,6 +297,7 @@ class PlacePolylineBodyState extends State { List _createPoints() { final List points = []; final double offset = _polylineIdCounter.ceilToDouble(); + print('offset is $offset'); points.add(_createLatLng(51.4816 + offset, -3.1791)); points.add(_createLatLng(53.0430 + offset, -2.9925)); points.add(_createLatLng(53.1396 + offset, -4.2739)); From f73f3f066d04cd8bc1d752a2cc1e3bd7b068a1bb Mon Sep 17 00:00:00 2001 From: "Aswin.K.V" Date: Mon, 4 May 2020 23:27:15 +0530 Subject: [PATCH 4/4] removed print statement. --- .../google_maps_flutter/example/lib/place_polyline.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart index 837c8f7a1d05..bc6ca0a3160b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart @@ -297,7 +297,6 @@ class PlacePolylineBodyState extends State { List _createPoints() { final List points = []; final double offset = _polylineIdCounter.ceilToDouble(); - print('offset is $offset'); points.add(_createLatLng(51.4816 + offset, -3.1791)); points.add(_createLatLng(53.0430 + offset, -2.9925)); points.add(_createLatLng(53.1396 + offset, -4.2739));