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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:45:13+00:00 2026-06-09T18:45:13+00:00

I have two activities and each has a Mapview. The problem is that when

  • 0

I have two activities and each has a Mapview. The problem is that when a Mapview changes its center or zoom the other one changes too. I’ve realized that each Mapview has a different id (in xml) and a different name variable. But the problem persist.

The code of each activity is too long to post here, because it implements a lot of functions. But I post the most significant part:

Activity A)

    mapview_publish = (MapView) findViewById(R.id.mapview_publish);
    mapview_publish.setBuiltInZoomControls(true);
    mapController = mapview_publish.getController();
    mapController.setZoom(16); /

XML A)

    <com.google.android.maps.MapView
            android:id="@+id/mapview_publish"
            android:layout_width="fill_parent"
            android:layout_height="87dp"
            android:layout_marginLeft="7dp"
            android:layout_marginRight="7dp"
            android:layout_marginTop="12dp"
            android:apiKey="myapikey"
            android:clickable="false" />

Activity B)

    mapView = (MapView) findViewById(R.id.mapview);
    mapview.setBuiltInZoomControls(true);
    mapController = mapView.getController();
    mapController.setZoom(20);

XML B)

    <com.google.android.maps.MapView
        android:id="@+id/mapview"
        style="@style/mapView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="40dp"
        android:apiKey="myapikey"
        android:background="@color/black"
        android:clickable="true" />
  • 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-09T18:45:15+00:00Added an answer on June 9, 2026 at 6:45 pm

    If you’re using multiple MapViews per process, it might conflict.

    https://developers.google.com/maps/documentation/android/reference/com/google/android/maps/MapActivity

    Only one MapActivity is supported per process. Multiple MapActivities
    running simultaneously are likely to interfere in unexpected and
    undesired ways.

    And also see my reply on How to use multiple MapActivities/MapViews per Android application/process

    But as SpK commented, please provide the code of your activities.

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

Sidebar

Related Questions

I have one class called Global and two other activities. In each activity I
Newbie question... So I have two activities, Cherry and Apple, and each one has
I have two activities. One activity has the main game and the other activity
I have two activities in an android application, each has a button that goes
If I have two activities in my app, one with listview and the other
I have an activity that has two tabs and a list view in each.
I have a fairly basic app that only has two Activities, the splash screen
I have two Activities along with one Application class, and whenever I call my
This is my situation. I have two activities: ONE and TWO. In TWO activity
I am experiencing a little pain on Android. I have two activities, one is

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.