Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.73 KB

Integration.md

File metadata and controls

68 lines (49 loc) · 1.73 KB

Integration guide

This article describes how to integrate mapsforge library in your project (use the proper versions).

Gradle

1. Map

1.1 Core

compile 'org.mapsforge:mapsforge-core:0.6.0'
compile 'org.mapsforge:mapsforge-map:0.6.0'
compile 'org.mapsforge:mapsforge-map-reader:0.6.0'
compile 'net.sf.kxml:kxml2:2.3.0'

1.2 Android

compile 'org.mapsforge:mapsforge-map-android:0.6.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'

Optionally:

compile 'org.mapsforge:mapsforge-map-android-extras:0.6.0'

1.3 Java

compile 'org.mapsforge:mapsforge-map-awt:0.6.0'
compile 'com.kitfox.svg:svg-salamander:1.0'

Maven

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

<dependency>
    <groupId>org.mapsforge</groupId>
    <artifactId>mapsforge-core</artifactId>
    <version>0.6.0</version>
</dependency>

JitPack

We support also JitPack for publishing Mapsforge. This can be used for the releases, but it's also useful for integrating SNAPSHOT builds in your application (not available in Maven central).

For example in order to include the mapsforge-core module master-SNAPSHOT with Gradle.

Add as repository:

maven { url "https://jitpack.io" }

And declare as dependency:

compile 'com.github.mapsforge.mapsforge:mapsforge-core:master-SNAPSHOT'

The same syntax applies for all Mapsforge modules. And with similar way you can declare the dependencies in Maven too.

Jars

You can find Mapsforge (regular and with dependencies) jars in the downloads section.

External dependencies jars can be found at their respective sites or in Maven central repository.