Gist 0f103baa5001934bf981bb7855d60a5e
✓ Published0🌍 Public
TThomasG77
Last edited Jun 29, 2021
Created on Jun 29, 2021
This example captures the OpenStreetMap legend at every zoom level from 1 to 19. The code uses Puppeteer to automate a headless browser, setting a French locale and a desktop viewport, then screenshots the legend panel at each zoom step. It relies on Puppeteer’s `page.evaluate`, `boundingBox`, and `page.screenshot` with a clip rectangle to extract the legend region. A companion Python script with PythonMagick computes image signatures to identify duplicate legend images across zoom levels.
AI-generated descriptionISC Licensed