Novices Performing Miracles
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    tessel-canvas-browserpublic

    Canvas tiles for tessel, in a browser via browserify.

    install

    npm install --save tessel-canvas-browser
    

    api

    tesselCanvas(mapState, canvasElement, callback, crossOrigin)

    Given a tessel map state and a canvas element from the DOM, download all necessary tiles and render them into the canvas, calling callback with any errors and the canvas element when finished.

    crossOrigin is a boolean flag for whether images are loaded with CORS so that the resulting Canvas does not suffer from the same origin policy.

    example

    var tessel = require('tessel'),
        tesselCanvas = require('tessel-canvas-browser');
     
    var map = tessel.map(),
        canvas = document.body.appendChild(document.createElement('canvas'));
     
    canvas.width = 500;
    canvas.height = 500;
     
    tesselCanvas(map.state(), canvas);

    install

    npm i tessel-canvas-browser

    Downloadsweekly downloads

    0

    version

    0.0.0

    license

    BSD

    last publish

    collaborators

    • avatar