Skip to content
Open
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
10 changes: 9 additions & 1 deletion libs/http-service/src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -238,7 +243,10 @@ void registerDefaultDatasourceTypes() {
bool withAttributeLayers = true;
if (auto withAttributeLayersNode = config["withAttrLayers"])
withAttributeLayers = withAttributeLayersNode.as<bool>();
return std::make_shared<geojsonsource::GeoJsonSource>(folder.as<std::string>(), withAttributeLayers);
std::string mapId;
if (auto mapIdNode = config["mapId"])
mapId = mapIdNode.as<std::string>();
return std::make_shared<geojsonsource::GeoJsonSource>(folder.as<std::string>(), withAttributeLayers, mapId);
}
throw std::runtime_error("Missing `folder` field.");
},
Expand Down
Loading