Problem
Currently, the GeoJsonFolder data source derives the mapId automatically from the folder path using mapNameFromUri(). This transformation:
- Converts to lowercase
- Replaces
:, \, /, . with dashes
- Collapses consecutive dashes
- Removes
-openapi-json suffix
For example, /home/user/geodata becomes -home-user-geodata.
Users cannot override this behavior to set a meaningful, custom mapId.
Proposed Solution
Add an optional mapId property to the GeoJsonFolder configuration schema. If provided, use it directly; otherwise, fall back to the current mapNameFromUri() derivation.
Example config:
dataSources:
- type: GeoJsonFolder
folder: /path/to/my/geodata
mapId: my-custom-map # optional
withAttrLayers: true
Implementation
The GeoJsonSource constructor already supports an optional mapId parameter - it just needs to be wired through the config layer.
Problem
Currently, the
GeoJsonFolderdata source derives themapIdautomatically from the folder path usingmapNameFromUri(). This transformation::,\,/,.with dashes-openapi-jsonsuffixFor example,
/home/user/geodatabecomes-home-user-geodata.Users cannot override this behavior to set a meaningful, custom
mapId.Proposed Solution
Add an optional
mapIdproperty to theGeoJsonFolderconfiguration schema. If provided, use it directly; otherwise, fall back to the currentmapNameFromUri()derivation.Example config:
Implementation
The
GeoJsonSourceconstructor already supports an optionalmapIdparameter - it just needs to be wired through the config layer.