Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/mapget-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Required fields:

Optional fields:

- `withAttrLayers`: boolean flag. If `true`, nested objects in the GeoJSON `properties` are interpreted as attribute layers; if `false`, only scalar top‑level properties are emitted.
- `withAttrLayers` (default: `true`): boolean flag. If `true`, nested objects in the GeoJSON `properties` are converted to mapget attribute layers; if `false`, only scalar top‑level properties are emitted and nested objects are silently dropped.

Example:

Expand Down
6 changes: 4 additions & 2 deletions libs/http-service/src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ nlohmann::json geoJsonFolderSchema()
}},
{"withAttrLayers", {
{"type", "boolean"},
{"title", "With Attribute Layers"}
{"title", "With Attribute Layers"},
{"description", "Convert nested GeoJSON property objects to mapget attribute layers. Default: true."},
{"default", true}
}}
}},
{"required", nlohmann::json::array({"folder"})},
Expand Down Expand Up @@ -233,7 +235,7 @@ void registerDefaultDatasourceTypes() {
"GeoJsonFolder",
[](YAML::Node const& config) -> DataSource::Ptr {
if (auto folder = config["folder"]) {
bool withAttributeLayers = false;
bool withAttributeLayers = true;
if (auto withAttributeLayersNode = config["withAttrLayers"])
withAttributeLayers = withAttributeLayersNode.as<bool>();
return std::make_shared<geojsonsource::GeoJsonSource>(folder.as<std::string>(), withAttributeLayers);
Expand Down
Loading