Skip to content

Latest commit

 

History

History
84 lines (50 loc) · 2.38 KB

README.md

File metadata and controls

84 lines (50 loc) · 2.38 KB

Wax

Tools for improving web maps. The centerpiece of the code is a client implementation of the MBTiles interaction specification.

Controls

  • wax.tooltip
  • wax.legend

OpenLayers

  • wax.ol.Interaction
  • wax.ol.Legend

Google Maps API v3

  • wax.g.Controls
  • wax.g.MapType
  • wax.g.mapBoxLogo

Lib

Records

The main usage of mapping frameworks through Wax is via records. Records are pure JSON objects that have a 1:1 representation with function Javascript code, but, unlike imperative code, can be stored and manipulated as configuration. Records are tested with polymaps, openlayers and Google Maps API v3, but the system (/lib/record.js) is generalized beyond mapping tools of any sort, to exist as a basic Javascript AST interpreter.

Currently records support several control techniques:

  • @new instantiates objects
  • @chain runs functions, changing the value of this with each run
  • @inject runs a function in a @chain without changing the reference to this
  • @call runs a function from the global scope changing the value of this
  • @literal allows an object attribute to be referenced
  • @group runs a set of record statements (e.g. using the keywords above) in order

These techniques (with arbitrary levels of nesting), are sufficient to construct maps in each mapping framework.

Requirements

Building

Install mainline UglifyJS:

npm install https://github.com/mishoo/UglifyJS/tarball/master

Make the combined & minified OpenLayers & Google Maps libraries:

make build

Includes

Wax includes two libraries in /lib which are included in builds

Changelog

1.0.2

  • Bug fixes for Firefox 3

1.0.1

  • make ext added for downloading and installing external libraries needed to use examples.
  • Bug fixes for legend, IE compatibility

1.0.0

  • Initial release

Authors

  • Tom MacWright (tmcw)
  • Young Hahn (yhahn)
  • Will White (willwhite)