Permalink
Browse files

bug/#1181 - correct orientation for marker icons on orientated maps

Impacted classes:
* `Marker`: fixed the orientation computation in method `draw`
* `SampleMarker`: used a more orientation-obvious icon for better tests
  • Loading branch information...
monsieurtanuki committed Nov 2, 2018
1 parent f41733f commit 87ee3eeb5eb7090ef185b0a7e7da14f98b9afbd7
@@ -34,7 +34,7 @@ public void addOverlays(){
super.addOverlays();
final List<GeoPoint> points = new ArrayList<>();
final Drawable drawable = getResources().getDrawable(R.drawable.icon);
final Drawable drawable = getResources().getDrawable(R.drawable.marker_default);
GeoPoint startPoint = new GeoPoint(38.8977, -77.0365); //white house
points.add(startPoint);
@@ -339,7 +339,7 @@ public boolean isInfoWindowShown(){
mIcon.setAlpha((int)(mAlpha*255));
float rotationOnScreen = (mFlat ? -mBearing : mapView.getMapOrientation()-mBearing);
float rotationOnScreen = (mFlat ? -mBearing : -mapView.getMapOrientation()-mBearing);
drawAt(canvas, mPositionPixels.x, mPositionPixels.y, rotationOnScreen);
if (isInfoWindowShown()) {
//showInfoWindow();

0 comments on commit 87ee3ee

Please sign in to comment.