Android doesn't use or support java.awt.* APIs, have you tried these: http://developer.android.com/reference/android/graphics/Path.html
http://developer.android.com/reference/android/graphics/Canvas.html#drawPath(android.graphics.Path, android.graphics.Paint) But I don't see anything really wrong with the way you're doing it (except for possibly joins and antialiasing at the vertices). -- Kostya 2011/1/25 Dudero <[email protected]> > Hello, > > I want to display borders(based on GeoPoints) on my mapview but > android does not support anything like: > > java.awt.polygon > > At the moment i solve this with the following code in the draw-method > of an ItemizedOverlay: > > for(int i = 0;i< geopoints.size();i++){ > > > if(i<size()-1) > canvas.drawLine(Point(i).x, > Point(i).y, Point(i+1).x, Point(i+1), > mPaint); > //Außer beim letzen Punkt: zeichne hier zum > ersten Punkt: > Geschlossenheit > else > > mapView.getProjection().toPixels(((OverlayItem) > mOverlays.get(0)).getPoint(), pxNew); > canvas.drawLine(pxOld.x, pxOld.y, pxNew.x, > pxNew.y, mPaint); > } > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- 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

