Wax
Tools for improving web maps. The centerpiece of the code is a client implementation of the MBTiles interaction specification.
For full documentation of supported mapping APIs and how to use Wax see http://mapbox.github.com/wax.
Building Wax
For end users, a minified library is already provided in dist/
.
But for developers you can rebuild a minified library by running:
npm install --dev
make
Building docs
Wax uses docco for documention. Install docco and build docs by running:
npm install --dev
make doc
Includes
Wax currently includes one external:
Authors
- Tom MacWright (tmcw)
- Young Hahn (yhahn)
- Will White (willwhite)
3.0.0
- TileJSON support in new map connectors:
wax.mm.connector
,
wax.leaf.connector
and wax.g.connector
. The old wax.g.maptype
and
wax.mm.provider
have been removed. - All
g
, leaf
and mm
controls now use the signature
function (map, tilejson, options) {}
where relevant TileJSON keys in
tilejson
are used if present and options
contains settings specific to
the control. - Fullscreen, zoomer, attribution and legend controls no longer automatically
append themselves to the map div. Use the
.appendTo
method to add the DOM
element to the map or to another element on the page. w.melt(func)
now has the same return value as func
.
2.x.x
var provider = new wax.mm.provider({
baseUrl: 'http://a.tiles.mapbox.com/mapbox/',
layerName: 'natural-earth-2'});
var map = ...;
wax.mm.legend(map);
3.x.x
var connector = new wax.mm.connector({
tiles: 'http://a.tiles.mapbox.com/mapbox/1.0.0/natural-earth-2/{z}/{x}/{y}.png',
scheme: 'tms'
});
var map = ...;
wax.mm.legend(map, { legend: 'Content' }).appendTo(map.parent);