From ca88f308a0c08882d127b9534be5a44069fb69e6 Mon Sep 17 00:00:00 2001 From: Edgar Onghena Date: Fri, 11 Jul 2025 13:35:19 -0400 Subject: [PATCH] Allow customization of the attribution text in the CLI --- create-static-map/create-static-map.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/create-static-map/create-static-map.go b/create-static-map/create-static-map.go index a6b91ef..184f9a7 100644 --- a/create-static-map/create-static-map.go +++ b/create-static-map/create-static-map.go @@ -171,6 +171,7 @@ func main() { Areas []string `short:"a" long:"area" description:"Add an area to the static map" value-name:"AREA"` Circles []string `short:"C" long:"circle" description:"Add a circle to the static map" value-name:"CIRCLE"` ThunderforstAPIKey string `long:"thunderforestapikey" description:"API key to use with Thunderforst tile servers" value-name:"APIKEY" default:"NONE"` + Attribution string `long:"attribution" description:"Override the attribution text" value-name:"ATTRIBUTION"` } parser := flags.NewParser(&opts, flags.HelpFlag|flags.PassDoubleDash) @@ -213,6 +214,10 @@ func main() { ctx.SetUserAgent(opts.UserAgent) } + if parser.FindOptionByLongName("attribution").IsSet() { + ctx.OverrideAttribution(opts.Attribution) + } + handleAreasOption(ctx, opts.Areas) handleMarkersOption(ctx, opts.Markers) handleImageMarkersOption(ctx, opts.ImageMarkers)