summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2015-09-01 17:16:39 -0400
committerMike Morris <michael.patrick.morris@gmail.com>2015-09-01 17:16:39 -0400
commit0145f60dba93086e93d84b61ccc908b780063df3 (patch)
tree78cd5a06445bd9104b35c64b231546f608bcc8fc /platform
parent45eb197bd31bacacf9d1963512dd9a2bcc8ee56d (diff)
downloadqtlocation-mapboxgl-0145f60dba93086e93d84b61ccc908b780063df3.tar.gz
drop platform/node/examples, this is covered in README
Diffstat (limited to 'platform')
-rwxr-xr-xplatform/node/examples/load-from-fs.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/platform/node/examples/load-from-fs.js b/platform/node/examples/load-from-fs.js
deleted file mode 100755
index f8c072d4b5..0000000000
--- a/platform/node/examples/load-from-fs.js
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env node
-/* jshint node: true, unused: false */
-'use strict';
-
-var mbgl = require('../../..');
-var fs = require('fs');
-var path = require('path');
-var PNG = require('pngjs').PNG;
-
-var base = path.join(__dirname, '../test');
-
-var map = new mbgl.Map({
- request: function(req) {
- fs.readFile(path.join(base, req.url), function(err, data) {
- req.respond(err, { data: data });
- });
- },
- ratio: 1.0
-});
-
-map.load(require('../test/fixtures/style.json'));
-
-map.render({}, function(err, data) {
- if (err) throw err;
-
- var png = new PNG({
- width: data.width,
- height: data.height
- });
-
- png.data = data.pixels;
-
- png.pack()
- .pipe(fs.createWriteStream('image.png'))
- .on('finish', function() {
- console.warn('Written image.png');
- });
-});