How to add the osmdroid library via Gradle
spyhunter99 edited this page Apr 25, 2020
·
19 revisions
If you use Gradle you have to add the following dependency to your build.gradle
file:
dependencies {
implementation 'org.osmdroid:osmdroid-android:(INSERT_VERSION_HERE)'
}
Adds basic support for WMS servers, specifically GeoServer
dependencies {
implementation 'org.osmdroid:osmdroid-wms:(INSERT_VERSION_HERE)'
}
Adds Maps Forge support
dependencies {
implementation 'org.osmdroid:osmdroid-mapsforge:(INSERT_VERSION_HERE)'
}
Adds geopackage support
dependencies {
implementation 'org.osmdroid:osmdroid-geopackage:(INSERT_VERSION_HERE)'
}
NOTICE: This library is no longer maintained. It is still in the source code repo but we no longer publish release artifacts for it. The last release version of it is 6.0.1. The most capabilities was moved into osmdroid-android. This library only contains a Google Maps API abstraction which no longer works due to changes made by Google.
osmdroid also has an optional library to provide additional features of 3rd party organizations.
dependencies {
implementation 'org.osmdroid:osmdroid-third-party:6.0.1'
}