3.3. FileSource
A <FileSource>
can be used as a child of <Map>
to declare named directory paths
that then can be referred to as base
attribute in for files to read by data sources file
, like e.g. the CSV
and GeoJSON
ones,
and for symbolizers that are able to load image files, like e.g. <PointSymbolizer>
, <LinePatternSymbolizer>
etc.
Attribute | Value | Default | Description |
---|---|---|---|
|
string |
none |
Example 10. FileSource DataSource example
The actual file to be processed in the example below will be taken from path/to/csv-data/file.csv
:
<Map>
<FileSource name='csv-base'>path/to/csv-data</FileSource>
[...]
<DataSource>
<Parameter name="type">csv</Parameter>
<Paramater name="base">csv-base</Parameter>
<Parameter name="file">file.csv</Parameter>
</DataSource>
[...]
</Map>
Example 11. FileSource Symbolizer example
The actual symbol file being used in the example below will be taken from path/to/symbols/symbol.svg
:
<Map>
<FileSource name='symbols'>path/to/symbols</FileSource>
[...]
<PointSymbolizer base='symbols' file='symbol.svg'/>
[...]
</Map>