Coder Social home page Coder Social logo

wax's Introduction

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

Modest Maps

Modest Maps is the primary target for Wax, given its simplicity and high quality.

  • wax.interaction()
  • wax.zoomer()
  • wax.zoombox()
  • wax.boxselect()
  • wax.pointselector()
  • wax.legend()
  • wax.mobile()
  • wax.fullscreen()
  • wax.zoombox()
  • wax.hash()

OpenLayers

  • wax.ol.Interaction
  • wax.ol.Legend
  • wax.ol.Embedder
  • wax.ol.Switcher

Google Maps API v3

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

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, Modest Maps 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

Usage Examples

Samples of usage can be found in examples/. These depend on localizing copies of each API code.

To set up the examples first run:

make ext

Then check out the example html files.

Building library

For wax users, a minified library is already provided in build/.

But for developers you can rebuild a minified library by running:

make build

Install mainline UglifyJS:

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

Make the combined & minified OpenLayers & Google Maps libraries:

rm -r build
make build

Building docs

Wax uses docco for documention. Install it like:

npm install --dev

Make the docs:

make doc

Includes

Wax currently includes one external:

Authors

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

wax's People

Contributors

wrynearson avatar yhahn avatar ianshward avatar febbraro avatar kkaefer avatar

Stargazers

 avatar

Watchers

James Cloos avatar

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.