Giter VIP home page Giter VIP logo

wax's Introduction

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.

Versions

If you're building a new site, **use the latest tag of Wax 6.x.x. Version 7 is in the master branch and is unstable.

To find more detail of what has changed in each version, consult CHANGELOG.md.

Compatibility

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

Includes

Wax currently includes three externals:

wax's People

Contributors

ansis avatar bshelton229 avatar ckopanos avatar dhcole avatar dmitrig01 avatar febbraro avatar fredj avatar infostreams avatar jacobtoye avatar javisantana avatar kkaefer avatar miccolis avatar sk1p avatar svanderbleek avatar tmcw avatar tnightingale avatar wildintellect avatar willwhite avatar wrynearson avatar xavijam avatar yhahn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wax's Issues

Popups

We should get popups working, if nothing else to test the full mode of interaction formatters.

Interaction spec

To be clear here, we've actually been working around an undocumented interaction API that extends TMS:

  • 1.0.0/{map}/formatter.json
  • 1.0.0/{map}/legend.json
  • 1.0.0/{map}/{z}/{x}/{y}.grid.json

This is actually distinct from the MBTiles interaction spec, which is essentially a spec about how MBTiles should store data such that a service would have what it needs to implement the endpoints above.

We should figure out where this spec should live and revisit some decisions. I'm now thinking that formatter.json & legend.json should be combined into a single endpoint that is also a marker indicating that a certain layer supports the spec. At the moment wax is querying for grid.json against every layer that seems like it might support the spec and it would be good to avoid this.

interaction broken?

Hi,
the interaction example in the manual ( http://mapbox.github.com/wax/manual/index.html ) seems to be currently broken. It only works as long as you don't pan/zoom. Then, when moving the mouse over the map, it throws

Uncaught TypeError: Cannot call method 'charCodeAt' of undefined

at wax.mm.js:287 (in wax.GridInstance.getFeature)

At one instance, this was because (y-tileY) was negative, though I have no idea how this can happen...

Test our wax API

Next big task -- update tilestream to use wax, as well as our examples if possible. This will tell us where the wax API is broken and probably more likely which of our "glue code" needs to be refactored to be more friendly toward reification.

Some initial guesses at bad apples that need to get in line:

  • "externals", e.g. wax.ol.ZoomOnLoad
  • the google maps connector code

Don't try to redownload grid.json after status >= 400

Currently, wax tries to redownload a grid.json file on every mouse movement when the previous download failed due to a 404. We should either send a 200 response with a reasonable default or stop wax from attempting to redownload failed grid.json files.

Legend for g

We'll need to abstract the OL legend control and implement it for google.

Expose API objects after they are created by wax record

It would be useful to the expose the actual API objects that the wax record creates so you can use a more traditional API for further manipulation after the wax is processed.

This would allow you to use a wax record as a starting point, but then follow traditional documentation to add further functionality.

Examples

Once we have some interaction mbtiles up publicly on mapbox.com we'll be able to point our examples at them.

OpenLayers Example - Interactive Layers

There seems to be a lack of documentation on how to use openlayers with Wax. All of the examples in the manual are for ModestMaps or Google Maps. I looked back at the /examples directory that used to be part of Wax, but it focused on Records based maps. Are there some simple examples out there of how to put together a Wax based OpenLayers map?

I am using a base layer and then an interactivity overlay on top of that. It looks like I need to use OpenLayers for that because ModestMaps only support a single layer. I have built the docs using Docco, but they don't provide too much insight.

Thanks for any pointers you can offer!

restore contextual menu allowing access to tile url after move to mm

In the move to MM in TileMill we lost the ability to right click on the tile and copy the "path to the image" so that a tile url can be quickly grabbed for debugging.

Any suggestions on how to do this with mm? (or ideally re-create what we had with OpenLayers?) Tagging as an issue here because I assume we need to write a custom MM control.

Project restructuring

Just discussed this with tmcw we need to restructure wax to be easier for implementers to use and know what to include.

One possibility:

wax/
  connectors/
    ol.js
    g.js
  lib/
    grid.js
    tooltip.js
    legend.js
    json.js

Other layout proposals?

Tooltips for overlapping/clustered interaction

I am not quite sure at what layer this issue lies (TileMill, Stream or Wax). It doesn't look like the toolchain can handle interactivity layers where there are multiple points and the same location. An example would be 3 points at the same addresses, you would want information for all 3 points returned when moused over. Is this currently possible and I am doing this wrong? Is special coding need for the Wax tooltips when you have multiple points?

The ideal behavior would be that you would get all of the items displayed with you mouse over a point and all of the detailed information for all of the points when you click.

Dispose of old images

Long-running pages will fill up with grid data. The Google API gives us nice utilities for this OpenLayers might. We should use them to garbage-collect.

Figure out zoom-undefined bug

Zooming out sometimes kills maps, leaving an error about coord.zoom being undefined. This might be a modestmaps core bug - will need more investigation.

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.