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

The Archive Base Latest Questions

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

Currently I am loading one tile data-layer over an OSMdroid basemap with final MapTileProviderBasic

  • 0

Currently I am loading one tile data-layer over an OSMdroid basemap with

final MapTileProviderBasic tileProvider = 
    new MapTileProviderBasic(getApplicationContext());
final ITileSource tileSource = 
    new XYTileSource("MyCustomTiles", null, 1, 16, 256, ".png",
            "http://a.url.to/custom-tiles/");
tileProvider.setTileSource(tileSource);
final TilesOverlay tilesOverlay = 
    new TilesOverlay(tileProvider, this.getBaseContext());
tilesOverlay.setLoadingBackgroundColor(Color.TRANSPARENT);
osmv.getOverlays().add(tilesOverlay);

Is it possible to render multiple data layers on top of each other over the BaseMap or can I only display one data layer at a time?
I found this example for GoogleMaps, but haven’t found some example OSMdroid code dealing with multipe tileSources at a time.

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

    Yes, of course you can. You just have to add another TilesOverlay to the map. The overlays(also tilesOverlays) get drawn consecutively, starting at the list’s lowest index(=0).
    Here’s an example:

    //create the first tilesOverlay
    final MapTileProviderBasic tileProvider = new MapTileProviderBasic(getApplicationContext());
    final ITileSource tileSource = new XYTileSource("MyCustomTiles", null, 1, 16, 256, ".png",
            "http://a.url.to/custom-tiles/");
    tileProvider.setTileSource(tileSource);
    final TilesOverlay tilesOverlay = new TilesOverlay(tileProvider, this.getBaseContext());
    tilesOverlay.setLoadingBackgroundColor(Color.TRANSPARENT);
    
    //create the second one
    final MapTileProviderBasic anotherTileProvider = new MapTileProviderBasic(getApplicationContext());
    final ITileSource anotherTileSource = new XYTileSource("MyCustomTiles", null, 1, 16, 256, ".png",
            "http://a.secondurl.to/custom-tiles/");
    anotherTileProvider.setTileSource(anotherTileSource);
    final TilesOverlay secondTilesOverlay = new TilesOverlay(anotherTileProvider, this.getBaseContext());
    secondTilesOverlay.setLoadingBackgroundColor(Color.TRANSPARENT);
    
    // add the first tilesOverlay to the list
    osmv.getOverlays().add(tilesOverlay);
    
    // add the second tilesOverlay to the list
    osmv.getOverlays().add(secondTilesOverlay);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I am loading data from a previous session into my application using the
I am currently loading data via ajax, upon its success the following jQuery function
I'm trying to prevent data from loading on the page when its needed. Currently,
Currently,I know how to do a lazy implementation of the loading procedure of the
I am currently looking at jQuery mobile and its system of loading web pages
We're currently using folders inside webroot to store images and videos which we're loading
I'm loading layers of images to make a single image. I'm currently stacking them
I am currently loading HTMl content via AJAX. I have code for things on
I am currently loading text into my app from an xml file from server.
Currently i have an application that reads and writes several properties from one or

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.