Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
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
4 changes: 4 additions & 0 deletions packages/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.20+2

* Android: Fix polyline width in building phase.

## 0.5.20+1

* Android: Unregister ActivityLifecycleCallbacks on activity destroy (fixes a memory leak).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
class PolylineBuilder implements PolylineOptionsSink {
private final PolylineOptions polylineOptions;
private boolean consumeTapEvents;
private final float density;

PolylineBuilder() {
PolylineBuilder(float density) {
this.polylineOptions = new PolylineOptions();
this.density = density;
}

PolylineOptions build() {
Expand Down Expand Up @@ -70,7 +72,7 @@ public void setVisible(boolean visible) {

@Override
public void setWidth(float width) {
polylineOptions.width(width);
polylineOptions.width(width * density);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void addPolyline(Object polyline) {
if (polyline == null) {
return;
}
PolylineBuilder polylineBuilder = new PolylineBuilder();
PolylineBuilder polylineBuilder = new PolylineBuilder(density);
String polylineId = Convert.interpretPolylineOptions(polyline, polylineBuilder);
PolylineOptions options = polylineBuilder.build();
addPolyline(polylineId, options, polylineBuilder.consumeTapEvents());
Expand Down
2 changes: 1 addition & 1 deletion 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
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
author: Flutter Team <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter
version: 0.5.20+1
version: 0.5.20+2

dependencies:
flutter:
Expand Down