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

  • Home
  • SEARCH
  • 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 556413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:55:01+00:00 2026-05-13T11:55:01+00:00

Trying to make an google maps overlay in an android program. Inside of my

  • 0

Trying to make an google maps overlay in an android program. Inside of my overlay’s draw method, I have two ways of adding a pin. One of them works, and one does not. Unfortunately, the one that does not work is also the only one that has the ability to add a shadow! Any help?

@Override
public void draw(android.graphics.Canvas canvas, MapView mapView,
        boolean shadow) {

    Point po = mapView.getProjection().toPixels(mapView.getMapCenter(),
            null);

    // This does _not_ work, but I would really like it to!
    drawAt(canvas, mapView.getResources().getDrawable(R.drawable.map_marker_v),
           po.x, po.y, false);

    // This does work, but only does half the job
    canvas.drawBitmap(BitmapFactory.decodeResource(mapView.getResources(),
            R.drawable.map_marker_v), po.x, po.y, null);


}

Edit: fixed type

  • 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-13T11:55:01+00:00Added an answer on May 13, 2026 at 11:55 am

    I think your problem may simply be that you haven’t set the bounds on the drawable in drawAt(). You can either manually set the bounds using Drawable.setBounds(), or you can use ItemizedOverlay’s convenience methods boundCenter() or boundCenterBottom().

    I believe the reason the second method works is because with a decoded Bitmap you don’t have to specify the bounds of the Drawable.

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

Sidebar

Ask A Question

Stats

  • Questions 344k
  • Answers 344k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Please post the exception you are getting; not just "it… May 14, 2026 at 5:39 am
  • Editorial Team
    Editorial Team added an answer I think you want something more like this: object[][] cellInfos… May 14, 2026 at 5:39 am
  • Editorial Team
    Editorial Team added an answer The tag pattern I quickly wrote for a recent small… May 14, 2026 at 5:39 am

Related Questions

Has anyone managed to use ItemizedOverlays in Android Beta 0.9? I can't get it
I'm working now on google maps, I'm trying to build something not even half
I'm trying to make an external call to the google maps application on the
I'm trying to figure out a nice way to limit the rate at which
I am working with both amq.js (ActiveMQ) and Google Maps . I load my

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.