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 6951853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:16:27+00:00 2026-05-27T14:16:27+00:00

I dropped a pin on Google map, if I click that pin means, it

  • 0

I dropped a pin on Google map, if I click that pin means, it shows the place information. This is working fine. But , My requirement is , when clicked that pin , i want to go some particular page, which is included in my code.
For ex: If i click this pin, i want to go the information details page in the application. How can I add the click event for the Google map point.
Here is my sample snippet..

private MapView mapView;

mapView = (MapView) findViewById(R.id.map_view);
mapView.setBuiltInZoomControls(true);
mapView.setTraffic(true);

List<Overlay> mapOverlays = mapView.getOverlays();
Drawable drawable = this.getResources().getDrawable(R.drawable.pushpin);
CustomItemizedOverlay itemizedOverlay = new CustomItemizedOverlay(drawable, this);
GeoPoint point = new GeoPoint((int)(12.826782 * 1e6),(int)(80.220298 * 1e6));
OverlayItem overlayitem = new OverlayItem(point, "Hello", "Helloo World!");
itemizedOverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedOverlay);

MapController mapController = mapView.getController();
mapController.animateTo(point);
mapController.setZoom(3);
  • 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-27T14:16:27+00:00Added an answer on May 27, 2026 at 2:16 pm

    In your CustomItemizedOverlay, you need to overide ItemizedOverlay.onTap(int).

    You’ll have something like that :

    @Override
    protected boolean onTap(int index) {
      OverlayItem item = mOverlays.get(index);
      // Do something with the item
      return true;
    }
    

    When this action occurs, if you want to create an activity, you’ll need to have the Context or to notify a listener. From my point of view, the second solution is better :

    public class CustomItemizedOverlay extends ItemizedOverlay {
    
        private MapItemListener mMapItemListener;
    
        ...
    
        public void setMapItemListener(MapItemListener mapItemListener) {
            this.mMapItemListener = mapItemListener;
        }
    
    
        @Override
        protected boolean onTap(int index) {
          OverlayItem item = mOverlays.get(index);
    
          if (mMapItemListener != null){
            mMapItemListener.onMapItemTap(item);
          }
    
          return true;
        }
    
        public interface MapItemListener {
                void onMapItemTap(OverlayItem item);
        }
    }
    

    And in your activity :

    public class MyMapActivity extends MapActivity implements MapItemListener {
    
    
        protected void myInitMapMethod(){
            ...
            CustomItemizedOverlay itemizedOverlay = new CustomItemizedOverlay(drawable, this);
            itemizedOverlay.setMapItemListener(this);
            ...
        }
    
        @Override
        public void onMapItemTap(OverlayItem item) {
            // Start activity
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on some code that dropped on me when another developer (and the
I readed this: Drop Pin on Default Google Maps from My App in Android?
I have a function that drop pin with this code: ParkPlaceMark *placemark=[[ParkPlaceMark alloc] initWithCoordinate:location];
I dropped the idea of using this for my program, but I am intrigued
Today I've dropped back into a project that I haven't been working with for
I always thought that when you dropped a control onto an .aspx page that
How can I restore a mysql database that was dropped using a drop database
I have to restore a database that has been inadvertently DROPped in MySQL 5.0.
What is the best FREE Datepicker that can be dropped into an ASPX application?
I've implemented a set of draggable elements that can be dropped into some containers

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.