OpenStreetMap-Tools for Android
Find a file
2023-03-31 19:43:21 -04:00
.github/workflows #1808 enable connectedCheck integration tests, migrate integration to under OpenStreetMaps instead of osmdroid-android-it (#1809) 2022-05-30 12:08:43 -04:00
.idea/codeStyles #1808 enable connectedCheck integration tests, migrate integration to under OpenStreetMaps instead of osmdroid-android-it (#1809) 2022-05-30 12:08:43 -04:00
config #435 part 2, settings preferences for the various configuration options 2016-10-21 18:45:55 -04:00
gradle Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
images Reduce aspect ratio to less than 2:1 so that image can be used on Google Play 2015-12-10 13:01:02 +01:00
issues #489 update gradle fury references 2016-12-10 11:36:37 -05:00
OpenStreetMapViewer Updated NGA GEOPackage core from 2.0.1 to 6.5.0 (#1853) 2023-03-31 18:36:43 -04:00
osmdroid-android Fix Mapbox rester image api url. Add support for hightDPI. (#1873) 2023-03-31 18:56:56 -04:00
osmdroid-geopackage Updated NGA GEOPackage core from 2.0.1 to 6.5.0 (#1853) 2023-03-31 18:36:43 -04:00
osmdroid-mapsforge Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
osmdroid-server-jdk Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
osmdroid-shape #1831 resolves several issues with the release helper's generated poms 2022-08-22 19:30:59 -04:00
osmdroid-simple-map Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
osmdroid-wms #1831 resolves several issues with the release helper's generated poms 2022-08-22 19:30:59 -04:00
OSMMapTilePackager Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
releaseHelper #1831 resolves several issues with the release helper's generated poms 2022-08-22 19:30:59 -04:00
.gitattributes Normalize line endings 2014-03-06 21:46:12 +01:00
.gitignore #1808 enable connectedCheck integration tests, migrate integration to under OpenStreetMaps instead of osmdroid-android-it (#1809) 2022-05-30 12:08:43 -04:00
.travis.yml Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
archive.sqlite #428 more javadoc content 2016-10-01 12:57:34 -04:00
build.gradle Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
CHANGELOG.md #428 more javadoc content 2016-10-01 12:57:34 -04:00
CONTRIBUTING.md adding contributing 2016-10-05 21:55:58 -04:00
gradle.properties next cycle 2023-03-31 19:43:21 -04:00
gradlew Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
gradlew.bat Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
ISSUE_TEMPLATE.md nojira template 2019-09-28 20:48:23 -04:00
LICENSE Initial commit 2014-03-06 11:03:48 -08:00
OSMDroid_CleanUp_Settings.xml Normalize line endings 2014-03-06 21:58:50 +01:00
OSMDroid_Formatter_Settings.xml Normalize line endings 2014-03-06 21:58:50 +01:00
proguard_openmap.txt #633 progaurd updates per user feedback 2017-07-29 10:26:24 -04:00
proguard_osm.txt #633 progaurd updates per user feedback 2017-07-29 10:26:24 -04:00
proguard_osm_min.txt #381 sample proguard files 2016-08-28 10:07:08 -04:00
README.md next cycle 2023-03-31 19:43:21 -04:00
release.bat more release prep, minor release script documentation updates 2022-05-14 10:33:03 -04:00
settings.gradle Feature/#1776 build tech upgrades/build process improvements (#1793) 2022-05-05 18:52:28 -04:00
testzoom4.gemf #850 should fix resource leaks related to gemf files, offline archives and the demo app. adds some test files sources from US national aviation charts at zoom 4 2018-01-06 08:11:52 -05:00
testzoom4.sqlite #850 should fix resource leaks related to gemf files, offline archives and the demo app. adds some test files sources from US national aviation charts at zoom 4 2018-01-06 08:11:52 -05:00
testzoom4.zip #850 should fix resource leaks related to gemf files, offline archives and the demo app. adds some test files sources from US national aviation charts at zoom 4 2018-01-06 08:11:52 -05:00
travis.sh #321 temporarily disabling the maven build from ci until the maven-android plugin folks get things in order 2016-06-04 17:17:19 -04:00
world.map #180 auto zoom to bounds of the selected tile source for both geopackage and mapsforge. 2017-01-13 19:06:22 -05:00

osmdroid Build Status Maven Central Android Arsenal SourceSpy Dashboard

osmdroid is a (almost) full/free replacement for Android's MapView (v1 API) class. It also includes a modular tile provider system with support for numerous online and offline tile sources and overlay support with built-in overlays for plotting icons, tracking location, and drawing shapes.

Get it on F-Droid Get it on F-Droid

Current Release: 6.1.16 Mar 31, 2023

Current Development version: 6.1.17-SNAPSHOT

Next Release Version (planned): 6.1.17

Note: check your calendar, it may take up to a few days for all global mirrors to update.

Please read the osmdroid wiki for tutorials on integration.

Gradle dependency

repositories {
        mavenCentral()
}

dependencies {
    implementation 'org.osmdroid:osmdroid-android:<VERSION>'
}

Be sure to replace <VERSION> with the last release version above.

Maven dependency

<dependency>
  <groupId>org.osmdroid</groupId>
  <artifactId>osmdroid-android</artifactId>
  <version><VERSION></version>
  <type>aar</type>
</dependency>

Platform or API Level (API level 8 = Platform 2.2)

Note: this just assumes you need just osmdroid-android. Other modules require higher min SDK levels.

<platform>8</platform>

You can also compile osmdroid from source or download the dependency directly from OSS or download the distribution package

Want the latest and greatest?

We periodically publish snapshots to maven central. If you're interesting in trying it out, using the following:

repositories {
    mavenCentral()
    maven{
        url  'https://oss.sonatype.org/content/repositories/snapshots/'
        name 'OSS-Sonatype'
    }
}
dependencies {
    implementation 'org.osmdroid:osmdroid-android:<VERSION>-SNAPSHOT:debug@aar'
}

Use at your own risk though, it may not be stable or may have bugs or performance issues. If you run across any, please report them.

In case gradle doesn't resolve it, it can be download manually here: https://oss.sonatype.org/service/local/repositories/snapshots/content/org/osmdroid/osmdroid-android/-SNAPSHOT/osmdroid-android--SNAPSHOT.aar

Side note: gradle's cached dependencies and doesn't really handle snapshot very well. To force gradle to update snapshots on every build, try adding this to your root build.gradle file.

allprojects  {
  // forces all changing dependencies (i.e. SNAPSHOTs) to automagicially download
    configurations.all {
        resolutionStrategy {
            cacheChangingModulesFor 0, 'seconds'
    }
}

You can also build your project using the gradle option --refreshDependencies

OK now what?

Continue reading here, How-to-use-the-osmdroid-library

Related and important wiki articles

I have a question or want to report a bug

If you have a question, please view the osmdroid FAQ.
You can also view the Stack Overflow osmdroid tag and osmdroid Google Group where you can get feedback from a large pool of osmdroid users.

If you still have an issue, please check the Changelog page to see if this issue is fixed in a newer or upcoming version of osmdroid.

If think you have a legitimate bug to report then go to the Issues page to see if your issue has been reported. If your issue already exists then please contribute information that will help us track down the source of the issue. If your issue does not exist then create a new issue report. When creating an issue, please include the version of osmdroid, the Android platform target and test device you are using, and a detailed description of the problem with relevant code. It is particularly helpful if you can reproduce the problem using our OpenStreetMapViewer sample project as your starting point.

I want to contribute

See our contributing guide

For your reference, the dashboard provides a high level overview of the repository including structure of UI classes, module dependencies, external libraries, and other components of the system.

I want more!

The OSMBonusPack project adds additional functionality for use with osmdroid projects.

Screenshots

Demo Videos

Free Draw

Maps Forge

Floating point zoom

IIS Tracker

Building from source for editing osmdroid

JDK11+ is required Gradle 7.4.2 is what we are currently using Android Studio Bumblebee (latest supported configuration as of May 2022)

./gradlew clean build

Then you can install and test the app using normal command line utils.

Or just open Android studio.

Building from source and using the aar's in your app

JDK11+ is required Gradle 7.4.2 is what we are currently using (latest supported configuration as of May 2022)

We recommend building from the command line.

./gradlew clean build publishToMavenLocal

In your root build.gradle file, add mavenLocal() if not present.

allprojects {
    repositories {
            mavenCentral()
            mavenLocal()    //add this if it's missing
    }
}

Then in your APK or AAR project that needs osmdroid.

    implementation 'org.osmdroid:osmdroid-android:<VERSION>-SNAPSHOT:debug@aar'

Where VERSION is the version listed as the value for pom.version in osmdroid's gradle.properties. Note that when using the release versions from Maven Central, drop the :debug@aar part. When using a "release" version that you build locally with gradle, you'll need :debug@aar instead.