makinacorpus/MaLanterne

Name: MaLanterne

Owner: Makina Corpus

Description: null

Created: 2015-10-26 08:55:50.0

Updated: 2015-10-26 09:22:41.0

Pushed: 2015-12-02 12:19:05.0

Homepage: null

Size: 372

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OSMNav

Simple demo app using OSMDroid to display offline maps from MBTiles sources.

Prerequisites
Components used
Full Build

Install and run the application:

clone https://github.com/makinacorpus/MaLanterne.git
aLanterne
adlew clean assemble<Flavor>Debug

where Flavor is a variant chosen of the application to build (Camel case):

Deploying the application

Ensure that you have a connected device with Android 2.3.x or higher running and execute the following command after build:

adlew install<Flavor>Debug

You can combine a full build and deploy the application in a same command:

adlew clean install<Flavor>Debug
Using Offline Maps (MBTiles)
copy all MBTiles on the device

MBTiles sources should be copied locally on the device. First create a new directory inside /mnt/sdcard/Android/data/ according to the current flavor used (lower case):

then copy all *.mbtiles within this directory:

 *.mbtiles -exec adb push {} /mnt/sdcard/Android/data/com.makina.osmnav.<flavor>/ \;
configure the layer settings

Create a new JSON file within the assets/ folder named mbtiles.json:


"name": "Paris Gare de Lyon",
"bbox": [
    48.8487,
    2.3866,
    48.8368,
    2.3664
],
"layers": {
    "base": "gdl.mbtiles",
    "layers": [
        "gdl_2.0.mbtiles",
        "gdl_1.0.mbtiles",
        "gdl_0.0.mbtiles",
        "gdl_-0.25.mbtiles",
        "gdl_-0.5.mbtiles",
        "gdl_-0.75.mbtiles",
        "gdl_-1.0.mbtiles",
        "gdl_-2.0.mbtiles",
        "gdl_-3.0.mbtiles"
    ]
}

where:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.