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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:46:40+00:00 2026-06-02T21:46:40+00:00

i am develop map application in which i have display Google map and overlay-item

  • 0

i am develop map application in which i have display Google map and overlay-item in it.now i want custom dialog on tap of overlay item so can you tell me is that any class that i can implement easily??

Thanks
Nik

  • 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-02T21:46:42+00:00Added an answer on June 2, 2026 at 9:46 pm

    in ontap mathod of your overly class call like this

    @Override
        protected boolean onTap(int index)
        {
            item = mOverlays.get(index);
            displaySearchResultBubble();
    
    
            return true;
        }
    

    and the method is

    private void displaySearchResultBubble() {
    
    
            //Hide the bubble if it's already showing for another result
            mapView.removeView(bubble);
            bubble.setVisibility(View.GONE);
    
    
    
            ///
            GeoPoint point11 = item.getPoint();
            ///
            //Set some view content
    
            venueName.setText("Your Message");
            MapView.LayoutParams params = new MapView.LayoutParams(
                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT,
                point11, MapView.LayoutParams.BOTTOM_CENTER);
    
            bubble.setLayoutParams(params);
    
            mapView.addView(bubble);
    
            mapView.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
            Runnable r = new Runnable() {
                public void run() {
                    Animation fadeIn = AnimationUtils.loadAnimation(mContext, R.anim.fadein);
                    bubble.setVisibility(View.VISIBLE);
                    bubble.startAnimation(fadeIn);
                }
            };
    
            //This projection and offset finds us a new GeoPoint slightly below the actual OverlayItem,
            //which means the bubble will end up being centered nicely when we tap on an Item.
            Projection projection = mapView.getProjection();
            Point p = new Point();
    
            projection.toPixels(point11, p);
            p.offset(0, -(bubble.getMeasuredHeight() / 2));
            GeoPoint target = projection.fromPixels(p.x, p.y);
    
            //Move the MapView to our point, and then call the Runnable that fades in the bubble.
            mapView.getController().animateTo(target, r);
         }
    

    and your bubble is

     <?xml version="1.0" encoding="utf-8"?>
     <RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:gravity="center"
      android:paddingLeft="62dip"
    
      >
      <LinearLayout
    
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:orientation="vertical"
    
       >
      <TextView
      android:layout_width="185dip"
      android:layout_height="wrap_content"
      android:id="@+id/venuename"
      android:gravity="center_vertical"
      android:singleLine="true"
      android:hint="Hello"
      android:textSize="26px"
      >
      </TextView>
    </LinearLayout>
    </RelativeLayout>
    

    add this in your on create method

    LayoutInflater inflater = ((Activity) mContext).getLayoutInflater();
    bubble = (RelativeLayout) inflater.inflate(R.layout.bubble, mapView, false);
    venueName = (TextView) bubble.findViewById(R.id.venuename);
    

    hope you got your answer it is complete solution

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop an application in iPhone and Android both which can display
I am trying to develop a simple map application, which will display a map
I want to develop an android application which retrieving data from the Waze Live
I am developing JavaME LWUIT application which needs to display some data on map.
I am I want to develop a Campus Map application on iPhone. I am
I have been still learning Hibernate and I need to develope application which can
I have a task to develop the application with map kit and web service
I'm trying to develop an application using Google's maps and I can't get this
I have just started Android application development, I have develop the application of Google
Im trying to develop an application that should show a map using the Google

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.