@Override
public void draw(Canvas canvas, MapView mapView, boolean shadow)
{
if (shadow) {
Paint arcPaint = new Paint();
arcPaint.setARGB(250, 255, 255, 255);
arcPaint.setAntiAlias(true);
arcPaint.setFakeBoldText(true);
arcPaint.setStyle(Paint.Style.STROKE);
arcPaint.setStrokeWidth(2);
arcPaint.setShadowLayer(0.1f, 1.2f, 1.2f, Color.BLACK);
if (_fromLng < _toLng)
{
_drawer = new FlightRouteDrawer(mapView,
_fromLat, _toLat,
_fromLng, _toLng);
} else
{
_drawer = new FlightRouteDrawer(mapView,
_toLat, _fromLat,
_toLng, _fromLng);
}
canvas.drawArc(_drawer.getRouteOval(),
_drawer.getRouteStartAngle(),
_drawer.getRouteSweepAngle(),
false, arcPaint);
}
}
if you're interested in what FlightRouteDrawer is doing, well - it
does all sorts of trigonometric to get a nice arc from point A to
point B.
the fact is when I run this code with if (!shadow) then it draws the
arc.
but this code doesn't draw the arc.
On Aug 16, 8:24 pm, TreKing <[email protected]> wrote:
> On Mon, Aug 16, 2010 at 1:57 AM, oriharel <[email protected]> wrote:
> > What can I do with the "shadow layer" of the the google maps overlays?
>
> Anything you want, I would think.
>
> > I tried, naively, to draw something (an arc) only when (shadow == true)
> > and got nothing?
>
> Maybe you did something wrong? Post some code?
>
> > I'm interested in drawing arcs and arc shadows on a map.
> > is there a nice google-maps way to do this?
>
> Probably exactly what you're doing - only correctly =)
>
> ---------------------------------------------------------------------------
> ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en