Skip to content

Commit 48de40e

Browse files
committed
Forming the tag <OnlineResource> in the sld-file from the SYMBOL type MS_SYMBOL_SVG
Previously, the subtree of the <Graphic> tag from the SYMBOL type MS_SYMBOL_SVG was not generated in the sld-file. Fixed formatting error in snprintf.
1 parent bd9ff63 commit 48de40e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mapogcsld.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3418,7 +3418,7 @@ char *msSLDGetGraphicSLD(styleObj *psStyle, layerObj *psLayer,
34183418
}
34193419
} else
34203420
bGenerateDefaultSymbol =1;
3421-
} else if (psSymbol->type == MS_SYMBOL_PIXMAP) {
3421+
} else if (psSymbol->type == MS_SYMBOL_PIXMAP || psSymbol->type == MS_SYMBOL_SVG) {
34223422
if (psSymbol->name) {
34233423
pszURL = msLookupHashTable(&(psLayer->metadata), "WMS_SLD_SYMBOL_URL");
34243424
if (!pszURL)
@@ -3455,8 +3455,8 @@ char *msSLDGetGraphicSLD(styleObj *psStyle, layerObj *psLayer,
34553455
snprintf(szTmp, sizeof(szTmp), "<%sFormat>image/png</%sFormat>\n",
34563456
sNameSpace, sNameSpace);
34573457
} else
3458-
snprintf(szTmp, sizeof(szTmp), "<%sFormat>%s</%sFormat>\n", "image/gif",
3459-
sNameSpace, sNameSpace);
3458+
snprintf(szTmp, sizeof(szTmp), "<%sFormat>%s</%sFormat>\n", sNameSpace,
3459+
(psSymbol->type ==MS_SYMBOL_SVG)?"image/svg+xml":"image/gif",sNameSpace);
34603460

34613461
pszSLD = msStringConcatenate(pszSLD, szTmp);
34623462

0 commit comments

Comments
 (0)