Mapviews normally use lat/lon coordinates. And "pixels" re coming in a few varieties. So you probably want to read up about mapping coordinates to dips. (or dp)
On Monday, June 25, 2012 1:06:46 PM UTC-4, voullie wrote: > > Hi, > > I have an Android app where I try to attach a marker made from a custom > drawable onto a MapView. Since the drawable I'm using isn't symmetric I > want the drawable to attach to the map at a certain pixel offset from the > upper left corner but I can't seem to figure out how this is done. I've > created a custom class extending Overlay inside which I've overridden the > method > > *draw*(android.graphics.Canvas canvas, > MapView<https://developers.google.com/maps/documentation/android/reference/com/google/android/maps/MapView.html> > mapView, boolean shadow) > > Inside the draw() method I've tried using Overlay.drawAt() to draw the > drawable at an offset but it isn't generating the results I want. I'm > suspecting drawAt isn't even the proper way to do this. How can I change > the (0,0) coordinate of a drawable to a pixel offset (x, y) before > attaching it to the canvas? > > Any help is appreciated. Thanks! > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

