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 2 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
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