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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:49:36+00:00 2026-05-22T21:49:36+00:00

i searched for this Problem, and i found some stackoverflow Questions about the same

  • 0

i searched for this Problem, and i found some stackoverflow Questions about the same but without any idea how to resolve the problem.

I created an activity and i want to add a really small mapview (like 140w X 70h). It is only to show a small preview of where the place is. When you click this little mapview you get a new inflate to a new activity with the hole map.

MapView:

<com.google.android.maps.MapView android:id="@+id/mapview" 
                android:layout_width="140dip"
                android:layout_height="80dip"
                android:layout_below="@id/attributes"
                android:layout_alignParentRight="true"
                android:apiKey="****"
                android:paddingBottom="60dp"/>

LogCat:

05-30 14:34:53.758: ERROR/dalvikvm(1608): Out of memory: Heap Size=4039KB,   Allocated=2768KB, Bitmap Size=625KB
05-30 14:34:53.758: DEBUG/AndroidRuntime(1608): Shutting down VM
05-30 14:34:53.758: WARN/dalvikvm(1608): threadid=1: thread exiting with uncaught exception (group=0x400259f8)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608): FATAL EXCEPTION: main
05-30 14:34:53.768: ERROR/AndroidRuntime(1608): java.lang.OutOfMemoryError
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at com.google.googlenav.map.Map.resize(Unknown Source)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at com.google.android.maps.MapView.onMeasure(MapView.java:554)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.View.measure(View.java:8172)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:578)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:362)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.View.measure(View.java:8172)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:989)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.ScrollView.onMeasure(ScrollView.java:286)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.View.measure(View.java:8172)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:578)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:362)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.View.measure(View.java:8172)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.View.measure(View.java:8172)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.View.measure(View.java:8172)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.ViewRoot.performTraversals(ViewRoot.java:805)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1744)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.os.Looper.loop(Looper.java:144)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at android.app.ActivityThread.main(ActivityThread.java:4937)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at java.lang.reflect.Method.invokeNative(Native Method)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at java.lang.reflect.Method.invoke(Method.java:521)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-30 14:34:53.768: ERROR/AndroidRuntime(1608):     at dalvik.system.NativeStart.main(Native Method)

this is the error. When i use fill_parent it works, but i dont want a mapview with fill_parent.

Maybe you guys know another way to get a preview small image of the current (or given) position on the map as image.
Isn’t it possible to show a small mapview ?

thanks

  • 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-22T21:49:37+00:00Added an answer on May 22, 2026 at 9:49 pm

    If you just want to show a static map without interaction I recommend the static map api from google. You can define markers, the center, the size and some labels and it returns a generated image that can be easily shown inside a ImageView. The benefit of this: You don’t have to invoke a complete MapView for just a small map image. No overhead of memory or user interaction. Perfect for the scenario you have.

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

Sidebar

Related Questions

No related questions found

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.