Skip to content

Commit

Permalink
Fix location indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
Pygmalion69 committed Jul 8, 2023
1 parent f84f7f1 commit 7844671
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "org.nitri.opentopo"
minSdkVersion 21
targetSdkVersion 33
versionCode 36
versionName "1.13.1"
versionCode 37
versionName "1.13.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/java/org/nitri/opentopo/MapFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,14 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
R.drawable.ic_map_location);
}
mLocationOverlay.setPersonIcon(bmMapLocation);
mLocationOverlay.setPersonAnchor(bmMapLocation.getWidth() / 2f, bmMapLocation.getHeight() / 2f);
mLocationOverlay.setPersonHotspot(bmMapLocation.getWidth() / 2f, bmMapLocation.getHeight() / 2f);

Bitmap bmMapBearing = Util.getBitmapFromDrawable(requireActivity(), R.drawable.ic_direction, 204);
if (bmMapBearing == null) {
bmMapBearing = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_map_bearing);
}
mLocationOverlay.setPersonIcon(bmMapLocation);
mLocationOverlay.setDirectionIcon(bmMapBearing);
mLocationOverlay.setDirectionArrow(bmMapLocation, bmMapBearing);

mScaleBarOverlay = new ScaleBarOverlay(mMapView);
mScaleBarOverlay.setCentred(true);
Expand Down

0 comments on commit 7844671

Please sign in to comment.