attribution

This commit is contained in:
Zsolt Ero
2024-01-11 12:51:21 +01:00
parent 28d0514f0c
commit 88363b653a

View File

@@ -35,6 +35,14 @@ def cli(metadata_path: Path, tilejson_path: Path, url_prefix: str, minify: bool)
assert not metadata_json_key # check that no more keys are left
tilejson['attribution'] = metadata.pop('attribution')
# overwriting new style OSM license, until fixed in tile_gen
tilejson['attribution'] = (
'<a href="https://openfreemap.org/" target="_blank">OpenFreeMap</a> '
'<a href="https://www.openmaptiles.org/" target="_blank">&copy; OpenMapTiles</a> '
'Data from <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>'
)
tilejson['bounds'] = [float(n) for n in metadata.pop('bounds').split(',')]
tilejson['center'] = [float(n) for n in metadata.pop('center').split(',')]
tilejson['center'][2] = 1