Giter VIP home page Giter VIP logo

mbtilesdroidspitterexamplesimple's Introduction

Overview

Simple example of use of the MBTilesDroidSpitter library reading the MBTiles format from Android.

Screenshots at: https://github.com/djcoin/MBTilesDroidSpitterExampleSimple/tree/master/assets/screenshots

Features

  • Load a database taken from /sdcard/map.mbtiles (change the path in source code to change the database to load, will be fixed soon)
  • Load one tile at a time given its x/y/z taken from user input and display the matching tile or error message if none
  • Display the metadata information of the table

Setting up

Fetch an sqlite "MBTiled" database if you don't have any

Get an SQLite database in the MBTiles format.

You may find some at http://mapbox.com/tileset/world-light.
E.g.: wget http://mapbox-tilesets.s3.amazonaws.com/mbtiles/World_Light.mbtiles.zip)

Make your database "Android" compatible

Android requires any sqlite database to have an non-empty "android_metadata" table.
E.g.: sqlite3 <your_database> "CREATE TABLE IF NOT EXISTS android_metadata (locale TEXT DEFAULT 'en_US'); DELETE FROM android_metadata; INSERT INTO android_metadata VALUES ('en_US');"

Load it to your device and make it fetchable

Load the database on your device.
E.g.: adb push path/to/your/sqlite_android_enabled_db /sdcard/map.mbtiles

If you load it in your sdcard base directory and name it "map.mbtiles" it will be loaded automatically. Otherwise, put it wherever you like and change the path of the sqlite database in the source code

Contributors

mbtilesdroidspitterexamplesimple's People

Contributors

djcoin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kccyp quzn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.