Attribution

Display attribution information on the map. This internally creates the attribution, and then you can add it to a map by chaining .appendTo(map.parent).

Example

<div id='map-div'></div>
<script type='text/javascript'>
var mm = com.modestmaps;

wax.tilejson(
  'http://tiles.mapbox.com/mapbox/api/Tileset/geography-class',
  function(tilejson) {
    var m = new mm.Map('map-div',
      new wax.mm.connector(tilejson));
    wax.mm.attribution(m, tilejson).appendTo(m.parent);
    m.setCenterZoom(new mm.Location(39, -98), 2);
  }
);
</script>

API

attribution = wax.mm.attribution(map, tilejson)
Create a new legend object. This control requires the TileJSON object to be valid and contain a valid attribution attribute.
attribution.appendTo(element)
Add the attribution element - a div of the form
<div class='wax-attribution'>legend content</div>
blog comments powered by Disqus