diff --git a/libs/http-service/src/cli.cpp b/libs/http-service/src/cli.cpp index 58464881..e305e24d 100644 --- a/libs/http-service/src/cli.cpp +++ b/libs/http-service/src/cli.cpp @@ -92,6 +92,11 @@ nlohmann::json geoJsonFolderSchema() {"title", "Folder"}, {"description", "Path to a folder containing GeoJSON tiles."} }}, + {"mapId", { + {"type", "string"}, + {"title", "Map ID"}, + {"description", "Custom map identifier. If not provided, derived from folder path."} + }}, {"withAttrLayers", { {"type", "boolean"}, {"title", "With Attribute Layers"}, @@ -238,7 +243,10 @@ void registerDefaultDatasourceTypes() { bool withAttributeLayers = true; if (auto withAttributeLayersNode = config["withAttrLayers"]) withAttributeLayers = withAttributeLayersNode.as(); - return std::make_shared(folder.as(), withAttributeLayers); + std::string mapId; + if (auto mapIdNode = config["mapId"]) + mapId = mapIdNode.as(); + return std::make_shared(folder.as(), withAttributeLayers, mapId); } throw std::runtime_error("Missing `folder` field."); },