About
This is a set of free and open source map layer and data source implementations in top of Nutiteq Maps SDK, 2.x version http://www.nutiteq.com. You can use it as a ready-made library, or modify sources according to your needs. License: MIT
NB! This works only with Nutiteq SDK 2.x version branch. It is NOT compatible with the newest Nutiteq SDK 3.x version.
Getting started
- Guides: https://github.com/nutiteq/hellomap3d/wiki for guides.
- API docs: browse JavaDoc or download javadoc jar
- Sample app code: https://github.com/nutiteq/hellomap3d/tree/master/AdvancedMap3D
- Running AdvancedMap3D sample app: https://github.com/nutiteq/hellomap3d/wiki/Get-advancedmap3d-to-start
Usage in your app
To use the library in your app you need to include AdvancedLayers and external dependencies to your project. Depending on your development environment and IDE there are three different ways to do it:
a) In Android Studio / Gradle
Into your build.gradle
// Make sure you have nutiteq snapshot repository:
allprojects {
repositories {
mavenCentral()
maven {
url "http://repository-nutiteq.forge.cloudbees.com/release/"
}
maven {
url "http://repository-nutiteq.forge.cloudbees.com/snapshot/"
}
}
}
// add advancedlayers dependency:
dependencies {
compile "com.nutiteq:nutiteq-3d-sdk:2.3.1"
compile "com.nutiteq.advancedlayers:AdvancedLayers:1.0-SNAPSHOT"
}
b) Maven (Eclipse)
Add to your pom.xml (full sample: https://github.com/nutiteq/hellomap3d/blob/master/AdvancedMap3D/pom.xml):
<repositories>
<repository>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<id>cloudbees-nutiteq-snapshot</id>
<name>Nutiteq SDK snapshot repository</name>
<url>http://repository-nutiteq.forge.cloudbees.com/snapshot/</url>
</repository>
<repository>
<id>cloudbees-nutiteq-release</id>
<name>Nutiteq SDK release repository</name>
<url>http://repository-nutiteq.forge.cloudbees.com/release/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${platform.version}</version>
<scope>provided</scope>
</dependency>
<!-- Advanced layers and Nutiteq SDK -->
<dependency>
<groupId>com.nutiteq.advancedlayers</groupId>
<artifactId>AdvancedLayers</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- Native (NDK) libraries built by Nutiteq -->
<dependency>
<groupId>com.nutiteq.advancedlayers</groupId>
<artifactId>ogrjni</artifactId>
<version>snapshot</version>
<classifier>armeabi</classifier>
<type>so</type>
</dependency>
<dependency>
<groupId>com.nutiteq.advancedlayers</groupId>
<artifactId>gdalconstjni</artifactId>
<version>snapshot</version>
<classifier>armeabi</classifier>
<type>so</type>
</dependency>
<dependency>
<groupId>com.nutiteq.advancedlayers</groupId>
<artifactId>gdaljni</artifactId>
<version>snapshot</version>
<classifier>armeabi</classifier>
<type>so</type>
</dependency>
<dependency>
<groupId>com.nutiteq.advancedlayers</groupId>
<artifactId>jsqlite</artifactId>
<version>snapshot</version>
<classifier>armeabi</classifier>
<type>so</type>
</dependency>
<dependency>
<groupId>com.nutiteq.advancedlayers</groupId>
<artifactId>osrjni</artifactId>
<version>snapshot</version>
<classifier>armeabi</classifier>
<type>so</type>
</dependency>
<dependency>
<groupId>com.nutiteq.advancedlayers</groupId>
<artifactId>proj</artifactId>
<version>snapshot</version>
<classifier>armeabi</classifier>
<type>so</type>
</dependency>
c) Manual jar file
-
Download Nutiteq code:
- Latest .jar file: AdvancedLayers-1.0-SNAPSHOT.jar
- Latest Nutiteq SDK jar file from https://github.com/nutiteq/hellomap3d/wiki/Downloads
- Save them to your project libs/ folder.
-
For other dependencies:
- Java libs from extlibs folder (https://github.com/nutiteq/advancedlayers/tree/master/extlibs)
- If you use native libraries (for e.g. sqlite, shapefile, geotiff etc) then you need also .so files from same location, usually armeabi/ folder is enough.
Test datasets
Depending on layers you may find useful to copy following files to the sdcard of your device, and modify paths in the code accordingly:
- Spatialite : Romania OpenStreetMap data, Spatialite 3.0 format: romania_sp3857.sqlite
- Mapsforge: AndroidMaps downloads
- Shapefiles: OpenStreetMap data, Estonia: shp_ee_3857.zip
- MBTiles: European countries with UTFGrid interaction: nutiteq.geography-class.mbtiles - created with TileMill. Global satellite: truemarble_epsg3857.mbtiles from Unearthed Outdoors