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

The Archive Base Latest Questions

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

I’m making an android app, which uses Google maps. One functionality is that the

  • 0

I’m making an android app, which uses Google maps. One functionality is that the user may touch on a point of the map and retrieve the coordinates. I found a great tutorial here http://mobiforge.com/developing/story/using-google-maps-android?page=1 which shows how to implement this with a MotionEvent (you can find the code on the tutorial under “Getting the Location that was touched”).

My problem is that touch events seem not to be supported by the emulator and I do not have an android device to test it anytime. So I would like to have a method, that allows me to click the screen with the mouse and get the coordinates of the pixel that was clicked (so to transform them to geocoordinates).

From my research so far I couldn’t find anything that fits and I do not no if something exists. Can anyone help?

  • 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-27T10:00:27+00:00Added an answer on May 27, 2026 at 10:00 am

    This will help u out:

    oncreate code:

       mapView = (MapView) findViewById(R.id.mapView);
                mapView.setBuiltInZoomControls(true);
                List<Overlay> mapOverlays = mapView.getOverlays();
                MapOverlay mapOverlay = new MapOverlay();
    
               mapOverlays.add(mapOverlay);
    

    inner class for overlay that will respond to touch (click on emulator)

     class MapOverlay extends com.google.android.maps.Overlay
            {   
    
            @Override
            public boolean onTap(GeoPoint p, MapView mapView) {
                // TODO Auto-generated method stub
    
    
                 mc= mapView.getController();
                mc.animateTo(p);
    
                latitude=p.getLatitudeE6() / 1E6;
                longitude=p.getLongitudeE6() /1E6 ;
                        Toast.makeText(Activity.this, 
                            p.getLatitudeE6() / 1E6 + "," + 
                            p.getLongitudeE6() /1E6 , 
                            Toast.LENGTH_SHORT).show();
          return true;
    
            }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an android app in which i am using google maps which
I am making an android app in which I have used google maps. these
I am making an app in which i am using google map and my
I'm making an android 1.6 app that uses phone's camera. In order to do
I am making an android app which will have two services that will keep
I am making an android app in which the user needs to add information.
I am new android, i'm making an app in which one can download files
So I'm making an Android 2.2 app that uses GLSurfaceView. My question is, since
I am making an android app in which I need to make different tables
I am making an android app in which i want to make a dynamic

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.