December 18, 2014

Maps, ItemizedOverlay, and You!

  • Ash

    An excellent tutorial, keep it up. Will this work with SDK 1.0 release, haven’t tried it yet.

  • Mark Murphy

    The code shown here should work. Note that in Android 1.0, they got rid of yet another means of providing mock location data, so you’re pretty much down to using DDMS.

  • Adam

    Nice tutorial! You shouldn’t have to call boundCenterBottom() in each draw(), though. One call in the constructor should be enough, e.g. “super(boundCenterBottom(marker))”. Then you won’t have to override draw() at all.k Alternately you can do the correct setBounds() in line 3 of the first code snippet.

  • Sudhakar

    Wow, unbelievable I have been trying to overlay items since a week with no luck. This tutorial works.Thank You very much for sharing your solution :)

  • Miral

    Thanks a lot for sharing this knowledge. Helped me a lot.

  • Matt

    What is the statement NooYawk.this on line 35 referring to? I am not familiar with this syntax. It seems as though you are referencing the static member this of the NooYawk class, which is somehow a Context then.

    Further explanation would be appreciated.

  • Mark Murphy

    NooYawk.this has been standard Java syntax since at least Java 1.5.

    The this “variable” refers to the object instance itself. However, with inner class instances, sometimes you need the “this” that represents the instance of the outer class, instead of the “this” that represents the inner class. NooYawk.this is the syntax to say, from an inner class instance, “I want the ‘this’ that is the outer class instance, please”.

  • Mapquest directions

    yes i believe it has been the same standard since java syntax 1.5 but i going to check though and ill tell you if it is, anyway i believe the syntax is here to stay

  • Chris

    Hi could you explain what NooYawk is? Is it an Activity class or what? It doesn't describe it anywhere in your code

  • Rich

    I’m working on a mapping application and this example is probably going to be REALLY helpful. However, I am a serious Android noob, and my understanding of it screen drawing methodology is extremely limited.

    I want to override draw so that I can display labels on my items all the time (their titles), but I don’t know anything about creating the canvas to pass in (or even if I have to).

    Can anyone point me at a drawing tutorial??

  • Pingback: Using ItemizedOverlay and OverlayItem In Android Beta 0.9 « « Programmers Goodies Programmers Goodies

  • Pingback: туроператор по израилю

  • Pingback: WordPress themes

  • Pingback: Full Report

  • Pingback:

  • Pingback: Drupal 7 not business templates

  • Pingback: altigraph antidotism anamnia

  • Hemant

    Thanks for the post, but how this will work in Maps API v2? Overlays is not supported in new version of API.