The fullscreen control adds a link to the map that assigns a fullscreen class to the map, which makes it fill the page.
You’ll see that this control adds a fullscreen link to the map, and that it’s
a bit ugly right now. Until Wax’s theming improves, keep in mind that its
styling, which is contained in theme/controls.css
, is completely optional
and you can replace it with your own.
<div id='map-div'></div>
<script>
var mm = com.modestmaps;
var tilejson = {
tilejson: '1.0.0',
scheme: 'tms',
tiles: ['http://a.tiles.mapbox.com/mapbox/1.0.0/world-light/{z}/{x}/{y}.png']
};
var m = new mm.Map('map-div',
new wax.mm.connector(tilejson));
wax.mm.fullscreen(m, tilejson).appendTo(m.parent);
m.setCenterZoom(new mm.Location(39, -98), 2);
</script>
fullscreen = wax.mm.fullscreen(map, tilejson)
fullscreen.appendTo(element)
<a class='wax-fullscreen'>fullscreen</a>