Home

Awesome

tilelive-arcgis

A tilelive.js adapter for reading from tile storage cache of ArcGIS

Circle CI

Introduction

This is a tilelive adapter from tile storage cache of ESRI ArcGIS.

It is readonly currently and can't be used to generate ArcGIS tile caches.

ArcGIS Tile Formats

There are 3 types of ArcGIS Tile Formats:

Install

npm install tilelive-arcgis

##Tilelive Protocol

// filetype is an optional parameter, default is 'png'.
// It is only useful for exploded tiles in other formats besides png 
var url = 'arcgis://path/to/tiles?filetype=jpg'

Usage

var fs = require('fs');
var Arcgis = require('tileive-arcgis');

//root folder of the tiles, where the Conf.xml stands
new Arcgis('arcgis://./test/sample/bundle', function(err, source) {
    if (err) throw err;
    source.getTile(2, 0xd50, 0x971, function(err, tile, headers) {
        if (err) throw err;
        console.log(headers);
        //tile is the buffer.
        fs.writeFileSync(tile);        
    });
    source.getInfo(function(error, info){
        if (err) throw err;
        console.log(info);
    });
});