Zoomer

A simple zoom control offering zoom in & out buttons. It creates links and appends them to the map.

Example

<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-bright/{z}/{x}/{y}.png']
};
var m = new mm.Map('map-div',
  new wax.mm.connector(tilejson));
wax.mm.zoomer(m, tilejson).appendTo(m.parent);
m.setCenterZoom(new mm.Location(39, -98), 2);
</script>

API

var zoomer = wax.mm.zoomer(map)
Create your own zoomer that controls a map called 'map'
zoomer.appendTo(element)
Add the zoom in & zoom out div elements to another element.
blog comments powered by Disqus