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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:23:36+00:00 2026-06-16T01:23:36+00:00

In Google Maps for Android v1 , MapView had a convenience method: getMapCenter() .

  • 0

In Google Maps for Android v1, MapView had a convenience method:
getMapCenter(). Now I cannot figure out how to get map center with v2 of this api. I have perused the API documentation, but there is no mention of such a feature. Please advise.

Thanks,
Igor

  • 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-16T01:23:37+00:00Added an answer on June 16, 2026 at 1:23 am

    I had the same problem. It seems you can get the center this way:

    mMap.getCameraPosition().target
    

    where mMap is the GoogleMap instance from your activity. This will return a LatLng object which basically represents the center of the map.

    Note that the GeoPoint class is not available anymore.

    According to http://developer.android.com/reference/com/google/android/gms/maps/model/CameraPosition.html

    target is “The location that the camera is pointing at.” (I tested it with the sample code and it worked okay for me)

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

Sidebar

Related Questions

I want to use com.google.android.maps.MapView, but can't figure out how to download the library
How to get the android:apikey for googlemap com.google.android.maps.MapView. i searched it but could not
Here is what i have in my map.xml file: <com.google.android.maps.MapView android:id=@+id/mapView android:layout_width=fill_parent android:layout_height=fill_parent android:enabled=true
import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import android.os.Bundle; public class Map2Activity extends MapActivity { /** Called
here is the XML file : <com.google.android.maps.MapView android:layout_width=fill_parent android:layout_height=fill_parent android:apiKey=0q7NUYm4bgzeXlqXtKYVPJDRWUJmt8Cu0gvbWMx android:id=@+id/map_view /> and Manifest
<?xml version=1.0 encoding=utf-8?> <com.google.android.maps.MapView xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/mapview android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true android:apiKey=YOUR API KEY /> This
I am working on an Android app that utilizes the Google Maps API MapView,
I'm using Android and Google Maps at API level 10, and I get latitude
I would like to create a draggable marker in Android MapView (com.google.android.maps.MapView), exactly like
I am trying to get google maps working. It is not displaying the map.

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.