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 3790728
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:21:35+00:00 2026-05-19T12:21:35+00:00

I am trying to replicate this feature of Maps in Android: You can see

  • 0

I am trying to replicate this feature of Maps in Android:
Custom Map Overlay

You can see that on the map, there’s a Circle depicting the range that the user has selected.

In my application, I’ll also want a dragger to reside on the perimeter of the circle, which can be dragged to redefine radius.

If someone could tell me how to draw custom drawable overlays and 2D graphics over map, I can do other things on my own.

Thanks!

The full application can be reached at this link

  • 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-19T12:21:36+00:00Added an answer on May 19, 2026 at 12:21 pm

    Okay, I tried to do things on my Own, and put this code to get the above effect:

    public class MarkerOverlay extends Overlay {
    
        Geocoder geoCoder = null;
    
        public MarkerOverlay() {
            super();
        }
    
    
        @Override
        public boolean onTap(GeoPoint geoPoint, MapView mapView){
            selectedLatitude = geoPoint.getLatitudeE6(); 
            selectedLongitude = geoPoint.getLongitudeE6();
            return super.onTap(geoPoint,mapView);
        }
    
        @Override
        public void draw(Canvas canvas, MapView mapV, boolean shadow){
    
            if(shadow){
                Projection projection = mapV.getProjection();
                Point pt = new Point();
                projection.toPixels(globalGeoPoint,pt);
    
                GeoPoint newGeos = new GeoPoint(selectedLat+(100),selectedLong); // adjust your radius accordingly
                Point pt2 = new Point();
                projection.toPixels(newGeos,pt2);
                float circleRadius = Math.abs(pt2.y-pt.y);
    
                Paint circlePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    
                circlePaint.setColor(0x30000000);
                circlePaint.setStyle(Style.FILL_AND_STROKE);
                canvas.drawCircle((float)pt.x, (float)pt.y, circleRadius, circlePaint);
    
                circlePaint.setColor(0x99000000);
                circlePaint.setStyle(Style.STROKE);
                canvas.drawCircle((float)pt.x, (float)pt.y, circleRadius, circlePaint);
    
                Bitmap markerBitmap = BitmapFactory.decodeResource(getApplicationContext().getResources(),R.drawable.pin);
                canvas.drawBitmap(markerBitmap,pt.x,pt.y-markerBitmap.getHeight(),null);
    
                super.draw(canvas,mapV,shadow);
            }
        }
    }
    

    This let me have following effect:

    Effect on Map

    The calculation used may not be what you want.
    Its just for demonstration purposes.
    Real range/distance calculation requires the use of bearing too and has some specific formula.

    Let me know if you have any questions regarding this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to replicate this: http://webdesignerwall.com/tutorials/css-gradient-text-effect however I can't seem to get it to
I'd like to use jQuery with Google maps. I'm trying to replicate this example
I am trying to replicate the feature in voice memos app that uses a
I am trying to replicate something similar to that of the 'flag' feature on
Rookie question, I think. I'm just trying to replicate this: http://rpubs.com/gallery/googleVis Open a new
I've done this before once, I'm trying to replicate what I did so far
This may be a stupid question, but I'm trying to replicate a customer's OpenLDAP
I'm trying to replicate something similar to the following map, where the polygonal area
I'm trying to replicate some of the functionality in Apple's avTouch, but I can't
UPDATE: In trying to replicate this problem one more time to answer your questions

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.