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" >
|
<Style name="world" filter-mode="first" >
|
||||||
<Rule>
|
<Rule>
|
||||||
<PointSymbolizer file="foo.png" transform="translate(4,2)" />
|
<PointSymbolizer file="[absolute path]" transform="translate(4,2)" />
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
<Layer name="world"
|
<Layer name="world"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<Style name="world" filter-mode="first" >
|
<Style name="world" filter-mode="first" >
|
||||||
<Rule>
|
<Rule>
|
||||||
<PointSymbolizer file="foo.png" transform="translate(2, 2), scale(2, 2)" />
|
<PointSymbolizer file="[absolute path]" transform="translate(2, 2), scale(2, 2)" />
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
<Layer name="world"
|
<Layer name="world"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<Style name="world" filter-mode="first" >
|
<Style name="world" filter-mode="first" >
|
||||||
<Rule>
|
<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>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
<Layer name="world"
|
<Layer name="world"
|
||||||
|
@ -180,10 +180,12 @@ helper.removeAbsoluteImages = function(xml) {
|
|||||||
xml.Map.forEach(function(map) {
|
xml.Map.forEach(function(map) {
|
||||||
if (map.Style) map.Style.forEach(function(style) {
|
if (map.Style) map.Style.forEach(function(style) {
|
||||||
style.Rule.forEach(function(rule) {
|
style.Rule.forEach(function(rule) {
|
||||||
if (rule.PolygonPatternSymbolizer) {
|
for (var symbolizer in rule) {
|
||||||
rule.PolygonPatternSymbolizer.forEach(function(symbolizer) {
|
for (var i = 0; i < rule[symbolizer].length; i++) {
|
||||||
symbolizer.file = '[absolute path]';
|
if (rule[symbolizer][i].file) {
|
||||||
});
|
rule[symbolizer][i].file = '[absolute path]';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user