From f91ac22bfc924fa6469e3a14dfe3c01f194a4261 Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Thu, 8 Jan 2015 16:21:24 +0100 Subject: [PATCH] adds method to gather image asset file names --- lib/carto/renderer_js.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/carto/renderer_js.js b/lib/carto/renderer_js.js index 716ed29..8064f2b 100644 --- a/lib/carto/renderer_js.js +++ b/lib/carto/renderer_js.js @@ -5,6 +5,7 @@ var _ = global._ || require('underscore'); function CartoCSS(style, options) { this.options = options || {}; + this.imageURLs = []; if(style) { this.setStyle(style); } @@ -164,6 +165,9 @@ CartoCSS.prototype = { } } }, + getIconURLs: function(){ + return this.imageURLs; + }, parse: function(cartocss) { var parse_env = { @@ -198,6 +202,13 @@ CartoCSS.prototype = { var layer = layers[key] = (layers[key] || { symbolizers: [] }); + this.imageURLs = _getImageURLs(def); + for(var u = 0; u