Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - promote pixel ratio to public api of NativeMapview.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Apr 25, 2018
1 parent 536860d commit d220ef4
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,15 @@ final class NativeMapView {
//

public NativeMapView(final Context context, final ViewCallback viewCallback, final MapRenderer mapRenderer) {
this(context, context.getResources().getDisplayMetrics().density, viewCallback, mapRenderer);
}

public NativeMapView(final Context context, float pixelRatio,
final ViewCallback viewCallback, final MapRenderer mapRenderer) {
this.mapRenderer = mapRenderer;
this.viewCallback = viewCallback;
this.fileSource = FileSource.getInstance(context);
this.pixelRatio = context.getResources().getDisplayMetrics().density;
this.pixelRatio = pixelRatio;
nativeInitialize(this, fileSource, mapRenderer, pixelRatio);
}

Expand Down

0 comments on commit d220ef4

Please sign in to comment.