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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:04:55+00:00 2026-06-15T15:04:55+00:00

I am having an issue with drawing custom tiles over Google maps. Using GoogleTileOverlay

  • 0

I am having an issue with drawing custom tiles over Google maps.

Using GoogleTileOverlay from OSMDroid, I am drawing custom tiles that are stored locally on the devices SD card.

The problem occurs after I have opened the map and then try to return to other activities. Things start getting weird. Background colors defined in XML aren’t showing up and other strange things.

I have searched far and wide for a reason and all I have been able to come up with is that there is not enough memory?

According to Eclipse MAT there is 8.4 MB of bitmaps left over after I have destroyed the activity that holds the MapView and GoogleTileOverlay

Let me know if there is any other information I can provide.

  • 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-15T15:04:56+00:00Added an answer on June 15, 2026 at 3:04 pm

    I was dealing with OOM exceptions due to memory leaks coming from the bitmaps. It seems that removing the overlay from MapView‘s Overlay list before clearing the tiles cache (so that no new tiles are created after the clearance) in onPause of map activity works. I ended up having single instance of LRUMapTileCache no matter how many times the map activity was created / resumed.

    My onPause batch is as follows:

    // .. get custom tiles off the screen first
    mMapView.getOverlays().remove(mCustomTilesOverlay);         
    // .. release all custom tiles' bitmaps
    mCustomTilesOverlay.clearTileCache();
    // .. unregister intent receiver (in order not to leak it)
    mCustomTilesOverlay.detach();
    // .. indicate not-ready state by clearing the reference
    mCustomTilesOverlay = null;
    

    The 8 MB still persist though (see edit), I’m using the android:largeHeap="true" application attribute to compensate.

    edit

    Turned out those 8 MB came from other sources. The cache gets successfuly cleared with this.

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

Sidebar

Related Questions

I'm having an issue using the canvas.drawText() method. I have a custom view, as
I having issue that content assistant / intellisense is working in methods such as
Hi guys I am having issue I have this query: SELECT * FROM useraccount
Having an issue here that I have tried everything I can think of but
I'm having an issue drawing to a canvas, I'm sure i'm missing something obvious
Been looking around stackoverflow and google for ways to solve this issue im having
I'm having an odd issue with CALayer drawing for the iPhone. I have a
In a Cocoa-based App i'm having a canvas for drawing, inherited from NSView, as
I'm having trouble implementing render to texture with OpenGL 3. My issue is that
While drawing rectangles in a UIView for ios I keep having the same issue:

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.