Experimental option to remap data links from inside of the styles
This commit is contained in:
parent
2da1bac6c7
commit
bfadeb799b
1 changed files with 4 additions and 0 deletions
|
@ -23,6 +23,10 @@ module.exports = function(options, repo, params, id, reportTiles, reportFont) {
|
||||||
|
|
||||||
if (fromData) {
|
if (fromData) {
|
||||||
mbtilesFile = mbtilesFile.substr(1, mbtilesFile.length - 2);
|
mbtilesFile = mbtilesFile.substr(1, mbtilesFile.length - 2);
|
||||||
|
var mapsTo = (params.mapping || {})[mbtilesFile];
|
||||||
|
if (mapsTo) {
|
||||||
|
mbtilesFile = mapsTo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var identifier = reportTiles(mbtilesFile, fromData);
|
var identifier = reportTiles(mbtilesFile, fromData);
|
||||||
source.url = 'local://data/' + identifier + '.json';
|
source.url = 'local://data/' + identifier + '.json';
|
||||||
|
|
Loading…
Reference in a new issue