Skip to content

Latest commit

 

History

History
136 lines (109 loc) · 4.88 KB

Integration.md

File metadata and controls

136 lines (109 loc) · 4.88 KB

Integration guide

This article describes how to integrate the library in your project, with Gradle / Maven / Jars or SNAPSHOT builds.

Current version is Maven Central

Gradle

Core

implementation 'org.mapsforge:vtm:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-themes:[CURRENT-VERSION]'
implementation 'org.slf4j:slf4j-api:1.7.25'

Android

implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi-v7a'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-mips'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-mips64'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86_64'
implementation 'com.caverock:androidsvg:1.2.2-beta-1'

Android (with libGDX)

implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi-v7a'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86_64'
implementation 'org.mapsforge:vtm-gdx:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-arm64-v8a'
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-armeabi'
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-armeabi-v7a'
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86'
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64'
implementation 'com.badlogicgames.gdx:gdx:1.9.8'
implementation 'com.badlogicgames.gdx:gdx-backend-android:1.9.8'
implementation 'com.caverock:androidsvg:1.2.2-beta-1'

iOS

Detailed iOS instructions can be found here.

Desktop

implementation 'org.mapsforge:vtm-gdx:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-linux'
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-osx'
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-windows'
implementation 'com.badlogicgames.gdx:gdx:1.9.8'
implementation 'com.badlogicgames.gdx:gdx-platform:1.9.8:natives-desktop'
implementation 'com.badlogicgames.gdx:gdx-backend-lwjgl:1.9.8'
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.3'
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-linux'
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-osx'
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-windows'
implementation 'com.metsci.ext.com.kitfox.svg:svg-salamander:0.1.19'

Optional

  • JTS geometries
implementation 'org.mapsforge:vtm-jts:[CURRENT-VERSION]'
implementation 'com.vividsolutions:jts:1.13'
  • Online tiles
implementation 'org.mapsforge:vtm-http:[CURRENT-VERSION]'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation 'com.squareup.okio:okio:1.13.0'
  • GeoJSON tiles
implementation 'org.mapsforge:vtm-json:[CURRENT-VERSION]'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.8.4'
implementation 'com.fasterxml.jackson.core:jackson-core:2.8.4'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.4'

Snapshots

We publish SNAPSHOT builds to Sonatype OSS Repository Hosting.

You need to add the repository:

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

And declare the dependencies like:

implementation 'org.mapsforge:vtm:master-SNAPSHOT'
...

For checking latest snapshot on every build:

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

Maven

The dependencies for Maven are declared in a similar way. For example:

<dependency>
    <groupId>org.mapsforge</groupId>
    <artifactId>vtm</artifactId>
    <version>[CURRENT-VERSION]</version>
</dependency>

Jars

You can find release and snapshot jars (regular and with dependencies) in Maven Central and Sonatype OSS Repository Hosting.

Third party jars can be found at their respective sites or in Maven Central repository.