Fix absolute paths in other symbolizer types
This commit is contained in:
parent
9f00195100
commit
3f31bcbe5f
@ -5,7 +5,7 @@
|
||||
|
||||
<Style name="world" filter-mode="first" >
|
||||
<Rule>
|
||||
<PointSymbolizer file="foo.png" transform="translate(4,2)" />
|
||||
<PointSymbolizer file="[absolute path]" transform="translate(4,2)" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<Layer name="world"
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<Style name="world" filter-mode="first" >
|
||||
<Rule>
|
||||
<PointSymbolizer file="foo.png" transform="translate(2, 2), scale(2, 2)" />
|
||||
<PointSymbolizer file="[absolute path]" transform="translate(2, 2), scale(2, 2)" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<Layer name="world"
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<Style name="world" filter-mode="first" >
|
||||
<Rule>
|
||||
<PointSymbolizer file="foo.png" transform="scale(10*[POP2005],[POP2005]), rotate(10,1,-1)" />
|
||||
<PointSymbolizer file="[absolute path]" transform="scale(10*[POP2005],[POP2005]), rotate(10,1,-1)" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<Layer name="world"
|
||||
|
@ -180,10 +180,12 @@ helper.removeAbsoluteImages = function(xml) {
|
||||
xml.Map.forEach(function(map) {
|
||||
if (map.Style) map.Style.forEach(function(style) {
|
||||
style.Rule.forEach(function(rule) {
|
||||
if (rule.PolygonPatternSymbolizer) {
|
||||
rule.PolygonPatternSymbolizer.forEach(function(symbolizer) {
|
||||
symbolizer.file = '[absolute path]';
|
||||
});
|
||||
for (var symbolizer in rule) {
|
||||
for (var i = 0; i < rule[symbolizer].length; i++) {
|
||||
if (rule[symbolizer][i].file) {
|
||||
rule[symbolizer][i].file = '[absolute path]';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user