Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6385891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:57:22+00:00 2026-05-25T02:57:22+00:00

Is there a third party lib or Android class like google.maps.Polygon to be used

  • 0

Is there a third party lib or Android class like google.maps.Polygon to be used in MapView (Native Google Maps APIs)? I have googled but I couldn’t find it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:57:23+00:00Added an answer on May 25, 2026 at 2:57 am

    The is no class for drawing polygons in the Maps API. See documentation here:

    http://code.google.com/android/add-ons/google-apis/reference/index.html

    Below is some code I used to draw a route given a list of points. You could probably modify it to do what you need.

    public class MapOverlay extends Overlay {
    
            ArrayList<GeoPoint> route;
    
            public MapOverlay(ArrayList<ParcelableGeoPoint> r) {
                    route = new ArrayList<GeoPoint>();
                    for (ParcelableGeoPoint p: r) {
                            route.add(p.getGeoPoint());
                    }
            }
    
            public void draw(Canvas canvas, MapView mapv, boolean shadow) {
                    super.draw(canvas, mapv, shadow);
    
                    Paint mPaint = new Paint();
                    mPaint.setDither(true);
                    mPaint.setColor(Color.rgb(128, 136, 231));
                    mPaint.setAlpha(100);
                    mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
                    mPaint.setStrokeJoin(Paint.Join.ROUND);
                    mPaint.setStrokeCap(Paint.Cap.ROUND);
                    mPaint.setStrokeWidth(6);
    
                    Path path = new Path();
    
                    GeoPoint start = route.get(0);
                    for (int i = 1; i < route.size(); ++i) {
                            Point p1 = new Point();
                            Point p2 = new Point();
    
                            Projection projection = mapv.getProjection();
                            projection.toPixels(start, p1);
                            projection.toPixels(route.get(i), p2);
    
                            path.moveTo(p2.x, p2.y);
                            path.lineTo(p1.x, p1.y);
    
                            start = route.get(i);
                    }
                    canvas.drawPath(path, mPaint);
            }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any third-party Templating Engines for Asp.net like we have smarty,savant for php
How do Visual Studio's testing tools compare to third-party frameworks like NUnit? Are there
I have a small third party flash application I'd like to incorporate in my
In our environment we have a Lib folder which contains various third party assemblies
I have a third-party library in my SVN repository and I'd like to associate
At work we have a third party library we use called MAPI LIB. It
Is there any third party IDE/manager available for Microsft SQL Server Like Navicat or
Are there any third-party libraries like RaphaelJS (http://www.raphaeljs.com) for Flash that lets you draw
Is there a third party tool or something similar that will allow users to
Apart from Sql server profiler ,is there any third party user friendly tool available

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.