geostyler / geostyler-mapfile-parser

GeoStyler Style Parser implementation for MapServer Mapfiles
BSD 2-Clause "Simplified" License
7 stars 5 forks source link

Configurable symbols.sym path #27

Closed ger-benjamin closed 4 years ago

ger-benjamin commented 4 years ago

https://jira.camptocamp.com/browse/GSSDI-27

If we use this lib not directly (I means, if the lib is in the nodes_modules), the current fallback path will be always false. Now we can set the path to symbol file via the class:

const mapFileParser = MapfileStyleParser();

mapFileParser.symbolsPath = 'my/path/to/symbols.sym';

Default to ${process.cwd()}/symbols.sym (process.cwd() => path of the folder where the node command executed.)

Or via the command line options:

mapfile-symbols-path=my/path/to/symbols.sym

This change was require to use geostyler-cli (see: #28 )