@@ -377,7 +377,7 @@ var getRemoteAsset = function getRemoteAsset(url, callback) {
377
377
* @param {number } width - width of output map (default: 1024)
378
378
* @param {number } height - height of output map (default: 1024)
379
379
* @param {Object } - configuration object containing style, zoom, center: [lng, lat],
380
- * width, height, bounds: [west, south, east, north], ratio, padding
380
+ * width, height, bounds: [west, south, east, north], ratio, padding, skipEncoding
381
381
* @param {String } tilePath - path to directory containing local mbtiles files that are
382
382
* referenced from the style.json as "mbtiles://<tileset>"
383
383
*/
@@ -399,7 +399,9 @@ var render = function render(style) {
399
399
_options$ratio = options . ratio ,
400
400
ratio = _options$ratio === void 0 ? 1 : _options$ratio ,
401
401
_options$padding = options . padding ,
402
- padding = _options$padding === void 0 ? 0 : _options$padding ;
402
+ padding = _options$padding === void 0 ? 0 : _options$padding ,
403
+ _options$skipEncoding = options . skipEncoding ,
404
+ skipEncoding = _options$skipEncoding === void 0 ? false : _options$skipEncoding ;
403
405
var _options$center = options . center ,
404
406
center = _options$center === void 0 ? null : _options$center ,
405
407
_options$zoom = options . zoom ,
@@ -621,6 +623,10 @@ var render = function render(style) {
621
623
buffer [ i + 1 ] = buffer [ i + 1 ] / norm ;
622
624
buffer [ i + 2 ] = buffer [ i + 2 ] / norm ;
623
625
}
626
+ }
627
+
628
+ if ( skipEncoding ) {
629
+ return resolve ( buffer ) ;
624
630
} // Convert raw image buffer to PNG
625
631
626
632
0 commit comments