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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:35:32+00:00 2026-06-11T01:35:32+00:00

I’ve researched a bit into this topic and have discovered that the last time

  • 0

I’ve researched a bit into this topic and have discovered that the last time this was asked (specifically for Google Maps), the answer was “it’s illegal”. Seeing as Google Maps now provides you with the ability to do Offline Caching yourself, why would it still be illegal?

Anyway, I have an app that I need to package a small map for (a few square miles). I’ve looked into doing osmdroid but it’s very difficult to follow what they’re doing. I’ve looked at their SVN repo’s and checked out their sample app on the Play Store and was disappointed. The app itself shows pretty much exactly what I need, but it uses some weird form of their code, not included in the SDK. osmdroid seems like my best option at this point but there doesn’t seem to be much references available.

If anyone could point me into the right direction of getting started with osmdroid OR just some other SDK that allows for packaged maps, I’d greatly appreciate it.

Note: I’ve tried doing it in osmdroid but when doing

 mapView.setUseDataConnection(false); 

The map loads nothing, even though the files appear to be in the correct directory (as it downloads all of its files there as well)

  • 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-11T01:35:34+00:00Added an answer on June 11, 2026 at 1:35 am

    To use Osmdroid like Google Maps you just need a couple of jar files in your project one being osmdroid-android-3.0.x.jar (for x – I’ve used version 5 and version 7 ). The other jar is the slf4j-android-1.5.8.jar. (There might be later versions of this, can’t remember where I got it from but there should be a link on the Osmdroid web site somewhere). The code is very similar to Google maps. This is the smallest working example I could produce

    package osmdemo.demo;
    
    import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
    import org.osmdroid.util.GeoPoint;
    import org.osmdroid.views.MapController;
    import org.osmdroid.views.MapView;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    // This is all you need to display an OSM map using osmdroid
    public class OsmdroidDemoMap extends Activity {
    
        private MapView         mMapView;
        private MapController   mMapController;
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
                setContentView(R.layout.osm_main);
            mMapView = (MapView) findViewById(R.id.mapview);
            mMapView.setTileSource(TileSourceFactory.MAPNIK);
            mMapView.setBuiltInZoomControls(true);
            mMapController = mMapView.getController();
            mMapController.setZoom(13);
            GeoPoint gPt = new GeoPoint(51500000, -150000);
            //Centre map near to Hyde Park Corner, London
            mMapController.setCenter(gPt);
    
        }
    }
    /* HAVE THIS AS YOUR osm_main.xml
    ---------------------------------------------------------- XML START
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
        <org.osmdroid.views.MapView
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent"
            android:id="@+id/mapview"
            ></org.osmdroid.views.MapView>
    </LinearLayout>
    ---------------------------------------------------------- XML END
    Include slf4j-android-1.5.8.jar and osmdroid-android-3.0.5.jar in the build path
    (Google search for where to get them from)
    */
    

    As for offline caching use Mobile Atlas creator (MOBAC) to make an Atlas in Osmdroid Zip format of the area of interest. I use OpenStreetMap as the tile source. Once you have the zip file just drop it into the Osmdroid directory on your device. It should give you offline capability. I use it all the time in my own app in London with packet data turned off in order to keep data downloads (and their cost) down.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
This could be a duplicate question, but I have no idea what search terms
I know there's a lot of other questions out there that deal with this
I'm making a simple page using Google Maps API 3. My first. One marker

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.