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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:30:12+00:00 2026-06-17T09:30:12+00:00

I am currently using the ItemizedOverlay class from the Maps V1 API, which keeps

  • 0

I am currently using the ItemizedOverlay class from the Maps V1 API, which keeps track of what marker (if any) is currently selected. Is there any similar functionality in Maps V2 to determine which marker is currently selected? Also, is there a way to programatically select a new marker?

  • 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-06-17T09:30:13+00:00Added an answer on June 17, 2026 at 9:30 am

    Yes.

    To determine which marker is selected, add a OnInfoWindowClickedListener to your GoogleMap:

    //mMap is an instance of GoogleMap
    mMap.setOnInfoWindowClickListener(getInfoWindowClickListener());
    

    Override the onInfoWindowClicked() method inside of the OnInfoWindowClickListener:

    public OnInfoWindowClickListener getInfoWindowClickListener()
    {
        return new OnInfoWindowClickListener() 
        {       
            @Override
            public void onInfoWindowClick(Marker marker) 
            {
                Toast.makeText(getApplicationContext(), "Clicked a window with title..." + marker.getTitle(), Toast.LENGTH_SHORT).show();
            }
        };      
    }
    

    And keep track of the selected marker, perhaps with an instance variable.

    To select a marker programmatically, you’ll have to keep a list of all your markers, then get a handle on one and call showInfoWindow(), similar to this:

    //markerList is just a list keeping track of all the markers you've added
    //to the map so far, which means you'll have to add each marker to this
    //list as you put it on the map
    Marker marker = this.markerList.get(someObjectYoureShowingAMarkerFor.getId());
    
    if(marker != null)
    {
        marker.showInfoWindow();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the com.google.android.maps API, I've got a MapActivity which uses ItemizedOverlay to place several
iam currently using NSURLConnection class to hit my server and get some data from
Currently using the HTTPServletRequest class and specifically the .getQueryString method to retrieve an inputted
Im currently using a UITableView like any other, and I am researching into the
Im currently using wxMediaCtrl to play videos in my app. The api is unfortunately
Im currently using PHP to fetch results from a mysql db. Im also displaying
I am using Google Map API v2 in my application to show Maps. I
Im currently using CodeIgniters active record class to UPDATE a MySQL table. One of
am currently using google feed api to get feed links dynamically. am trying to
We currently using openssl for timestamping. I wonder, is there a Java implementation of

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.