diff --git a/js/id/id.js b/js/id/id.js index d8c5e565a..cbfd267ec 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -212,8 +212,16 @@ window.iD = function () { return context; }; + var assetMap = {}; + context.assetMap = function(_) { + if (!arguments.length) return assetMap; + assetMap = _; + return context; + }; + context.imagePath = function(_) { - return assetPath + 'img/' + _; + var asset = 'img/' + _; + return assetMap[asset] || assetPath + asset; }; context.toggleFullscreen = function() {