|
|
|
@ -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<def.rules.length; u++){
|
|
|
|
|
if(def.rules[u].name == "marker-file" || def.rules[u].name == "point-file"){
|
|
|
|
|
var value = def.rules[u].value.value[0].value[0].value.value;
|
|
|
|
|
this.imageURLs.push(value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
layer.frames = [];
|
|
|
|
|
layer.zoom = tree.Zoom.all;
|
|
|
|
|
var props = def.toJS(parse_env);
|
|
|
|
|