More dead code condensing
This commit is contained in:
parent
d85290f422
commit
d36aa198db
@ -292,11 +292,6 @@ mess.Renderer = function Renderer(env) {
|
||||
' <!ENTITY <%= ref %> SYSTEM "<%= externals[ref] %>">\n' +
|
||||
'<% } %>]>\n'),
|
||||
|
||||
// referencing externals in the body of the map
|
||||
references = _.template('<% for (ref in externals) { %>' +
|
||||
'&<%= ref %>;\n' +
|
||||
'<% } %>'),
|
||||
|
||||
// for the Map[] doctype: XML entities to
|
||||
// organize code
|
||||
entity_list = { externals: [], symbols: [] };
|
||||
@ -313,14 +308,17 @@ mess.Renderer = function Renderer(env) {
|
||||
return rulesets[2].toMSS();
|
||||
}));
|
||||
|
||||
var output = [entities(entity_list)];
|
||||
// TODO: must change when background colors are available
|
||||
output.push('<Map background-color="'
|
||||
+ "#ffffff"
|
||||
// findBackground(stylesheets)
|
||||
+ '" 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">\n');
|
||||
var output = [
|
||||
'<?xml version="1.0" '
|
||||
+ 'encoding="utf-8"?>\n'
|
||||
+ '<!DOCTYPE Map[]>\n'
|
||||
+ '<Map background-color="'
|
||||
+ "#ffffff"
|
||||
// findBackground(stylesheets)
|
||||
+ '" 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">\n'];
|
||||
|
||||
m.Layer.forEach(function(l) {
|
||||
l.styles = [];
|
||||
@ -334,16 +332,17 @@ mess.Renderer = function Renderer(env) {
|
||||
// in order from high specificity to low.
|
||||
var by_symbolizer = that.split_symbolizers(matching);
|
||||
|
||||
var complete_chains = {};
|
||||
for (sym in by_symbolizer) {
|
||||
// Create styles out of chains of one-symbolizer rules,
|
||||
// and assign those styles to layers
|
||||
var new_style = new(mess.tree.Style)(
|
||||
l.id,
|
||||
sym,
|
||||
that.process_chain(by_symbolizer[sym]));
|
||||
var n = new_style.name();
|
||||
l.styles.push(n);
|
||||
l.styles.push(new_style.name());
|
||||
output.push(new_style.toXML());
|
||||
}
|
||||
|
||||
var nl = new(mess.tree.Layer)(l);
|
||||
output.push(nl.toXML());
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user