Wax has changed – it’s now at version 6. The API was the same from version 4 to 5 – though they had an upgrade in the Modest Maps dependency.
It changes at 6. Here’s a rundown:
Interaction and tooltip functionality is more flexible. While tooltips used to:
It is now:
More code, but for a good reason: it’s much more flexible. If your map layers change, and you have a new TileJSON object that describes how their interaction works, you can simply call
And the same with
.map(). The tooltip API is also much more powerful and accessible –
see the page on tooltips for more details.
Wax v6 is compatible with, and embraces the first major release of Modest Maps. The big change in the new version is that Modest Maps now supports multiple layers. For the most part, you can use it just like before, but one common thing that you do with a map is replacing the main layer – and that has changed.
map.setLayerAt(0, new wax.mm.connector(tilejson));
There’s lots more documentation on the new Layers Interface in the Modest Maps Wiki and also a page on upgrading to 1.0.0 that covers other, smaller changes.