replace __default__ with undefined/empty string
This commit is contained in:
parent
c5108fb786
commit
c0ac2e477f
@ -225,7 +225,7 @@ mess.Renderer = function Renderer(env) {
|
||||
var bySymbolizer = {};
|
||||
for (var i = 0; i < definitions.length; i++) {
|
||||
definitions[i].symbolizers().forEach(function(sym) {
|
||||
var index = sym + '/' + definitions[i].selector.attachment;
|
||||
var index = sym + (definitions[i].selector.attachment ? '/' + definitions[i].selector.attachment : '');
|
||||
if(!bySymbolizer[index]) {
|
||||
bySymbolizer[index] = [];
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ var assert = require('assert');
|
||||
|
||||
tree.Selector = function Selector(elements, filters, zoom, attachment, conditions, index) {
|
||||
this.elements = elements || [];
|
||||
this.attachment = attachment || '__default__';
|
||||
if (attachment) this.attachment = attachment;
|
||||
this.filters = filters || {};
|
||||
this.zoom = typeof zoom != 'undefined' ? zoom : tree.Zoom.all;
|
||||
this.conditions = conditions || 0;
|
||||
@ -26,7 +26,7 @@ tree.Selector.prototype.debug = function() {
|
||||
this.index;
|
||||
|
||||
var str = "[" + num + "] " + this.elements.join('');
|
||||
if (this.attachment !== '__default__') str += '::' + this.attachment;
|
||||
if (this.attachment) str += '::' + this.attachment;
|
||||
str += ': Zoom[' + tree.Zoom.toString(this.zoom) + '] ';
|
||||
var filters = Object.keys(this.filters);
|
||||
filters.sort();
|
||||
@ -42,7 +42,7 @@ tree.Selector.prototype.sound = function() {
|
||||
tree.Selector.prototype.clone = function() {
|
||||
var obj = Object.create(Object.getPrototypeOf(this));
|
||||
obj.elements = this.elements.slice();
|
||||
obj.attachment = this.attachment;
|
||||
if (this.attachment) obj.attachment = this.attachment;
|
||||
obj.filters = {};
|
||||
for (var id in this.filters) {
|
||||
obj.filters[id] = this.filters[id];
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="data-markers/__default__">
|
||||
<Style name="data-markers">
|
||||
<Rule>
|
||||
<Filter>([_votes_total_null] = 0) and ([votes_total] >= 312547.80000000005) and ([votes_total] <= 347275)</Filter>
|
||||
<MarkersSymbolizer meta-output="votes_name, votes_description"
|
||||
@ -289,7 +289,7 @@
|
||||
id="data"
|
||||
name="data"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>data-markers/__default__</StyleName>
|
||||
<StyleName>data-markers</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">ogr</Parameter>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="data-polygon/__default__">
|
||||
<Style name="data-polygon">
|
||||
<Rule>
|
||||
<Filter>([Dist_ID] = 1704)</Filter>
|
||||
<PolygonSymbolizer fill-opacity="0.6"
|
||||
@ -2004,7 +2004,7 @@
|
||||
id="data"
|
||||
name="data"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>data-polygon/__default__</StyleName>
|
||||
<StyleName>data-polygon</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-polygon/__default__">
|
||||
<Style name="world-polygon">
|
||||
<Rule>
|
||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||
<Filter>([NAME] = 'United States')</Filter>
|
||||
@ -24,7 +24,7 @@
|
||||
<PolygonSymbolizer fill="#ffffff"/>
|
||||
</Rule>
|
||||
</Style>
|
||||
<Style name="world-line/__default__">
|
||||
<Style name="world-line">
|
||||
<Rule>
|
||||
<Filter>([NAME] = 'Canada')</Filter>
|
||||
<LineSymbolizer stroke-width="1"
|
||||
@ -40,15 +40,15 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-line/__default__</StyleName>
|
||||
<StyleName>world-polygon/__default__</StyleName>
|
||||
<StyleName>world-line</StyleName>
|
||||
<StyleName>world-polygon</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
<Style name="countries-polygon/__default__">
|
||||
<Style name="countries-polygon">
|
||||
<Rule>
|
||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||
<Filter>([NAME] = 'United States')</Filter>
|
||||
@ -64,7 +64,7 @@
|
||||
<PolygonSymbolizer fill="#cccccc"/>
|
||||
</Rule>
|
||||
</Style>
|
||||
<Style name="countries-line/__default__">
|
||||
<Style name="countries-line">
|
||||
<Rule>
|
||||
<MaxScaleDenominator>12500000</MaxScaleDenominator>
|
||||
<LineSymbolizer stroke="#cccccc"
|
||||
@ -80,8 +80,8 @@
|
||||
id="countries"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>countries-line/__default__</StyleName>
|
||||
<StyleName>countries-polygon/__default__</StyleName>
|
||||
<StyleName>countries-line</StyleName>
|
||||
<StyleName>countries-polygon</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<Font face_name="Georgia Regular"/>
|
||||
<Font face_name="Arial Italic"/>
|
||||
</FontSet>
|
||||
<Style name="world-text/__default__">
|
||||
<Style name="world-text">
|
||||
<Rule>
|
||||
|
||||
<TextSymbolizer fontset_name="fontset-0"
|
||||
@ -18,14 +18,14 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-text/__default__</StyleName>
|
||||
<StyleName>world-text</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
<Style name="countries-text/__default__">
|
||||
<Style name="countries-text">
|
||||
<Rule>
|
||||
|
||||
<TextSymbolizer fontset_name="fontset-0"
|
||||
@ -37,7 +37,7 @@
|
||||
id="countries"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>countries-text/__default__</StyleName>
|
||||
<StyleName>countries-text</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-polygon/__default__">
|
||||
<Style name="world-polygon">
|
||||
<Rule>
|
||||
|
||||
<PolygonSymbolizer fill="#ff0000"/>
|
||||
@ -13,7 +13,7 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-polygon/__default__</StyleName>
|
||||
<StyleName>world-polygon</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-polygon-pattern/__default__">
|
||||
<Style name="world-polygon-pattern">
|
||||
<Rule>
|
||||
|
||||
<PolygonPatternSymbolizer file="[absolute path]"/>
|
||||
@ -13,7 +13,7 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-polygon-pattern/__default__</StyleName>
|
||||
<StyleName>world-polygon-pattern</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -3,13 +3,13 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-polygon/__default__">
|
||||
<Style name="world-polygon">
|
||||
<Rule>
|
||||
<Filter>([POP2005] > 100.1)</Filter>
|
||||
<PolygonSymbolizer fill="#ffffff"/>
|
||||
</Rule>
|
||||
</Style>
|
||||
<Style name="world-line/__default__">
|
||||
<Style name="world-line">
|
||||
<Rule>
|
||||
<Filter>([POP2005] > 100.1)</Filter>
|
||||
<LineSymbolizer stroke-width="0.5"
|
||||
@ -20,8 +20,8 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-line/__default__</StyleName>
|
||||
<StyleName>world-polygon/__default__</StyleName>
|
||||
<StyleName>world-line</StyleName>
|
||||
<StyleName>world-polygon</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-line/__default__">
|
||||
<Style name="world-line">
|
||||
<Rule>
|
||||
<MaxScaleDenominator>1500000</MaxScaleDenominator>
|
||||
<Filter>([NAME] = 'United States')</Filter>
|
||||
@ -74,7 +74,7 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-line/__default__</StyleName>
|
||||
<StyleName>world-line</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<Font face_name="Georgia Regular"/>
|
||||
<Font face_name="Arial Italic"/>
|
||||
</FontSet>
|
||||
<Style name="world-text/__default__">
|
||||
<Style name="world-text">
|
||||
<Rule>
|
||||
|
||||
<TextSymbolizer fontset_name="fontset-0"
|
||||
@ -18,7 +18,7 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-text/__default__</StyleName>
|
||||
<StyleName>world-text</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-polygon/__default__">
|
||||
<Style name="world-polygon">
|
||||
<Rule>
|
||||
|
||||
<PolygonSymbolizer fill="#ffffff"/>
|
||||
@ -13,7 +13,7 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-polygon/__default__</StyleName>
|
||||
<StyleName>world-polygon</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-text/__default__">
|
||||
<Style name="world-text">
|
||||
<Rule>
|
||||
<MaxScaleDenominator>6500000</MaxScaleDenominator>
|
||||
<MinScaleDenominator>3000000</MinScaleDenominator>
|
||||
@ -40,7 +40,7 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-text/__default__</StyleName>
|
||||
<StyleName>world-text</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-polygon/__default__">
|
||||
<Style name="world-polygon">
|
||||
<Rule>
|
||||
<PolygonSymbolizer fill="#aa3333"/>
|
||||
</Rule>
|
||||
@ -11,7 +11,7 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-polygon/__default__</StyleName>
|
||||
<StyleName>world-polygon</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
|
||||
|
||||
<Style name="world-polygon/__default__">
|
||||
<Style name="world-polygon">
|
||||
<Rule>
|
||||
<MinScaleDenominator>50000000</MinScaleDenominator>
|
||||
<PolygonSymbolizer fill="#ffff00"/>
|
||||
@ -17,14 +17,14 @@
|
||||
id="world"
|
||||
name="world"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>world-polygon/__default__</StyleName>
|
||||
<StyleName>world-polygon</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
<Style name="countries-line/__default__">
|
||||
<Style name="countries-line">
|
||||
<Rule>
|
||||
<MaxScaleDenominator>100000</MaxScaleDenominator>
|
||||
<LineSymbolizer stroke-width="0.25"/>
|
||||
@ -82,7 +82,7 @@
|
||||
id="countries"
|
||||
name="countries"
|
||||
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
|
||||
<StyleName>countries-line/__default__</StyleName>
|
||||
<StyleName>countries-line</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
|
Loading…
Reference in New Issue
Block a user