/TileView

The TileView widget is a subclass of ViewGroup that provides a mechanism to asynchronously display tile-based images for the Android mobile-application development framework, with additional functionality for 2D dragging, flinging, pinch or double-tap to zoom, adding overlaying Views (markers), built-in Hot Spot support, dynamic path drawing, multiple levels of detail, and support for any relative positioning or coordinate system.

Primary LanguageJavaMIT LicenseMIT

TileView

The TileView widget is a subclass of ViewGroup that provides a mechanism to asynchronously display tile-based images, with additional functionality for 2D dragging, flinging, pinch or double-tap to zoom, adding overlaying Views (markers), built-in Hot Spot support, dynamic path drawing, multiple levels of detail, and support for any relative positioning or coordinate system.

Documentation

Javadocs are here. Wiki is here.

Installation

The widget is straight java, so you can just use the .java files found here (with the dependencies mentioned below). A github release (jar, or zip) is available here. Recent versions of Eclipse with ADT can create projects with the compatability library already installed, and will automatically add jars in /libs/ to the build path, so just create a new project, add the tileviewlib.jar and the lrucache jar to /libs/ and you can start using the class.

Demo

A demo application, built in Eclipse, is available here.

The .apk can be downloaded directly.

Implementation

A minimal implementation might look like this:

TileView tileView = new TileView(this);
tileView.setSize(3000,5000);
tileView.addDetailLevel(1.0f, "path/to/tiles/%col%-%row%.jpg");

Dependencies

If you're targetting APIs less than 12, you'll need the Android compatability lib for the LruCache implementation.

Jake Wharton's DiskLruCache is also used. Here's a direct link to that jar.

Maven users

```xml com.qozix TileView 1.0.13 ```

Gradle users

```xml compile 'com.qozix:TileView:1.0.13' ```

Releases

Check here for the the latest release.