{}
BLACK FRIDAY SALE
Get Programiz PRO for LIFE at 60% off!
Claim My Discount
Sale ends in
BLACK FRIDAY
Save 60% on PRO: Sale Ends Soon!
Claim My Discount
run-icon
main.py
def generate_tile_urls(x_start, y_start, z, num_tiles=5): base_url = "https://tile.openstreetmap.org/{z}/{x}/{y}.png" urls = [] for x in range(x_start, x_start + num_tiles): for y in range(y_start, y_start + num_tiles): url = base_url.format(z=z, x=x, y=y) urls.append(url) return urls x_start = 32748 # starting x-coordinate y_start = 21787 # starting y-coordinate z = 16 # zoom level tile_urls = generate_tile_urls(x_start, y_start, z) for url in tile_urls: print(url)
Output