Skip to content

Commit

Permalink
better layer names
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Feb 7, 2024
1 parent 7e79f72 commit 7dc123d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def to_hierarchy(key_map, prefix, parent_key="", downloads={}, zips={}):
name = k
layer = {
"id": id,
"name": name,
"name": name.replace('_', ' ').capitalize(),
}
if id in downloads:
layer['download'] = downloads[id]
if id in zips:
layer['download'] = f'{prefix}{zips[id]}'
layer['download'] = str(zips[id])
if key_map[k]:
layer['children'] = to_hierarchy(key_map[k], parent_key=id, downloads=downloads, zips=zips, prefix=prefix)

Expand Down Expand Up @@ -107,7 +107,7 @@ def generate_files(cog_directory, colormap_file, output, tiles_base_url, prefix,
f"/tiler/tiles/WebMercatorQuad/{{z}}/{{x}}/{{y}}@1x?url={urllib.parse.quote_plus(tiles_base_url)}{urllib.parse.quote_plus(prefix)}{cog_path.name}&bidx=1{color}",
]
}
DOWNLOADS[name] = f"{prefix}/{filepath.name}"
DOWNLOADS[name] = f"{prefix}{filepath.name}"

template = env.get_template("style.json.tpl")

Expand Down

0 comments on commit 7dc123d

Please sign in to comment.