1. Download our Official Android App: Forums for Android!

Apps GMaps: clickable overlay markers?

Discussion in 'Android Development' started by speedracer, Jul 9, 2010.

  1. speedracer

    speedracer Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Nov 13, 2009

    Nov 13, 2009
    5
    0
    5
    I am working on integrating gmaps in my app and I know how to add overlay with drawable markers. But does anyone know if I can have these markers be clickable within my app and when clicked bring up a specified activity within my app?
    a good example would be something like foursquare or loopt on the iphone that shows friend's avatar and when clicked it goes to their profile view within the app.

    thanks!
     

    Advertisement

  2. pmunoz

    pmunoz Lurker
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Apr 30, 2010

    Apr 30, 2010
    2
    0
    5
    Hi speedracer,

    I'm working on the same, do you have some advance?
    Best regards,
     
  3. speedracer

    speedracer Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Nov 13, 2009

    Nov 13, 2009
    5
    0
    5

    yes, it turns out to be quite straight forward.
    Basically, what you need to do is extend ItemizedOverlay and override the onTap(int index) method to do whatever you need to do.


    ItemizedOverlay

    btw, after working with the map for while I've become pretty comfortable with it so if you have any other questions, feel free to ping me :)
     
  4. pmunoz

    pmunoz Lurker
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Apr 30, 2010

    Apr 30, 2010
    2
    0
    5
    speedracer thanks,

    I found an example of ItemizedOverlay and it works for me.

    ;)
     

Share This Page

Loading...