Skip to content

Commit

Permalink
Blue location marker
Browse files Browse the repository at this point in the history
  • Loading branch information
Pygmalion69 committed Sep 4, 2020
1 parent 7d62746 commit f149d22
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "org.nitri.opentopo"
minSdkVersion 19
targetSdkVersion 28
versionCode 24
versionName "1.11.1"
versionCode 25
versionName "1.11.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
15 changes: 9 additions & 6 deletions app/src/main/java/org/nitri/opentopo/MapFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,16 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
mLocationOverlay = new MyLocationNewOverlay(new GpsMyLocationProvider(getActivity()),
mMapView);

Bitmap bmCrosshairs = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_crosshairs);
Bitmap bmMapLocation = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_map_location);

mLocationOverlay.setPersonIcon(bmCrosshairs);
mLocationOverlay.setPersonHotspot(bmCrosshairs.getWidth() / 2f, bmCrosshairs.getHeight() / 2f);
Bitmap bmMapBearing = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_map_bearing);

mLocationOverlay.setPersonIcon(bmMapLocation);
mLocationOverlay.setPersonHotspot(bmMapLocation.getWidth() / 2f, bmMapLocation.getHeight() / 2f);

mLocationOverlay.setDirectionArrow(bmMapLocation, bmMapBearing);

mScaleBarOverlay = new ScaleBarOverlay(mMapView);
mScaleBarOverlay.setCentred(true);
Expand Down Expand Up @@ -306,8 +311,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
} else {
mLocationViewModel.getCurrentLocation().setValue(mLocationManager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER));
}


}

private void animateToLatLon(double lat, double lon) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f149d22

Please sign in to comment.