Hello

I want to draw line between the points i am creating on maps the
following is my code but it is not working preoprly can some one tel
me what could be wrong in it.

if(i>=1)
                {
                        mapControler.setCenter(point);
                 p1 = new Point();
             p2 = new Point();
            projection.toPixels(point, p1);
            int latitude1=(int)(latitudeArray[i]*1E6);
                int longitude1=(int)(longitudeArray[i]*1E6);
            GeoPoint point2= new GeoPoint(latitude1,longitude1);

              paint=new Paint();
            projection.toPixels(point2, p2);
                }
                OverlayItem overlayitem = new OverlayItem(point, "", "")



                {
                public void draw(Canvas canvas, MapView mapView, boolean shadow)
{
                        draw(canvas, mapView, shadow);
                        if(checkI())
                        {
                                canvas.drawLine(p1.x, p1.y, p2.x, p2.y, paint);
                        }

                        //draw ur line here on the canvas.
                        }
                        };

                itemizedOverlay.addOverlay(overlayitem);
                mapOverlays.add(itemizedOverlay);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to