Alternative to polylines

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Alternative to polylines

Postby androidLearner » Wed Dec 16, 2009 8:39 pm


I was wondering if there is an alternative to drawing lines between 2 coordinates on google maps in android. I have used GPolylines created with Google's utility and tranferred this to a web page to display the routes on the map interface.

I have the android hello, mapview tutorial working but am just trying to draw a simple route between 2 points but do not seem to know where to start or in other words where to put the code canvas.drawLine().

I have spent the last 3 days literally scanning the web trying to find a solution. There are some solutions on this forum but no clear explanations.

If I am asking too much let me know.
Once Poster
Once Poster
Posts: 1
Joined: Wed Dec 16, 2009 8:21 pm


Postby stifry » Thu Dec 17, 2009 12:03 am

How about Path and using canvas.drawPath()? Use Paint.setPathEffect to adjust your curvature.

selectedPathPaint.setPathEffect(new CornerPathEffect(20));

Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno
Image Image
User avatar
Posts: 46
Joined: Tue Feb 17, 2009 7:50 pm


Return to Map Problems

Who is online

Users browsing this forum: No registered users and 2 guests