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

Related Questions

actually im trying to make a webapp with jquery-mobile and google maps v3. i
I'm trying to transfer Rails-generated json into Google Maps markers on a map, but
I'm trying to figure out how well ExtJS and Google Maps play together. I'm
I am trying to make it so that when the user selects some things
Trying to make infoWindows a little less uglier I found out that the infoWindows
I am trying to make a div visible at the position of the cursor
I'm trying to make a call to the server with Ajax using Grails remoteLink.
I'm trying to make a loop to get wheather conditions from diferent cities and
Ok, I use mootools to display flash content through google maps and I work
HI, I'm trying to figure out which service and parameters to use to return

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.