diff --git a/OsmAnd-java/src/net/osmand/util/GeoPointParserUtil.java b/OsmAnd-java/src/net/osmand/util/GeoPointParserUtil.java index f991f80929..29172cc0db 100644 --- a/OsmAnd-java/src/net/osmand/util/GeoPointParserUtil.java +++ b/OsmAnd-java/src/net/osmand/util/GeoPointParserUtil.java @@ -97,6 +97,17 @@ public class GeoPointParserUtil { actual = GeoPointParserUtil.parse("geo", url); assertGeoPoint(actual, new GeoParsedPoint(qstr)); + // geo:50.451300,30.569900?z=15&q=50.451300,30.569900 (Kiev) + z = 15; + String qname = "Kiev"; + double qlat = 50.4513; + double qlon = 30.5699; + + url = "geo:50.451300,30.569900?z=15&q=50.451300,30.569900 (Kiev)"; + System.out.println("url: " + url); + actual = GeoPointParserUtil.parse("geo", url); + assertGeoPoint(actual, new GeoParsedPoint(qlat, qlon, z, qname)); + // http://download.osmand.net/go?lat=34&lon=-106&z=11 url = "http://download.osmand.net/go?lat=" + ilat + "&lon=" + ilon + "&z=" + z; System.out.println("url: " + url); @@ -335,7 +346,7 @@ public class GeoPointParserUtil { * * @param scheme * The intent scheme - * @param data + * @param uri * The URI object * @return {@link GeoParsedPoint} */ diff --git a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java index 6cfede7e37..9b15634d42 100644 --- a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java +++ b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java @@ -47,17 +47,15 @@ public class DirectionDrawable extends Drawable { @Override public void draw(Canvas canvas) { - if (favorite) { canvas.rotate(angle, canvas.getHeight()/2, canvas.getWidth()/2); Bitmap arrow = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_destination_arrow); canvas.drawBitmap(arrow, null, new Rect(0,0,arrow.getHeight(), arrow.getWidth()), null); } else { - canvas.rotate(angle, width / 2, height / 2); + canvas.rotate(angle, canvas.getHeight()/2, canvas.getWidth() / 2); Path directionPath = createDirectionPath(); canvas.drawPath(directionPath, paintRouteDirection); } - } @Override