Get a Free Trial

Programmatic Google Maps Screenshot: High Res, No Cookies or UI | GrabzIt

While both our screenshot API's and Online Screenshot Tool make taking screenshots of online maps easy, platforms like Google Maps or Mapbox are complex. They rely on dynamic tiles, contain clutter like search bars, and often throw cookie popups that ruin the final image.

To create the best possible quality screenshots—clean, high-resolution, and distraction-free—follow these methods:

1. Ensure High Resolution (Fixing Gray Tiles)

Maps load in tiles. If you capture the image too quickly, you may see gray squares or blurry sections. You must allow the JavaScript time to render.

Use a Delay: Specify a short delay of 1000-5000ms. This gives the map engine enough time to fetch all tiles before GrabzIt takes the picture.

2. Remove Cookie Banners & Popups

Nothing ruins a programmatic screenshot like a GDPR consent banner covering the map. You have two options to remove these:

  • Change Location: Set the country parameter to US. This often bypasses European GDPR popups entirely.
  • Auto-Click or Hide: If a banner persists, use the click parameter to automatically select the "I Agree" button, or use the hide parameter to remove the element entirely by targeting its CSS class.

3. Create a "Clean" Map (Removing UI)

To export a map that looks like a static image rather than a website, you should remove the standard Google Maps interface (search bars, zoom buttons, etc.).

You can hide these elements by passing their CSS selectors to the hide parameter. Alternatively, if you are triggering the capture via a button on your own site, you can hide the button itself so it doesn't appear in the result.

4. Capture Maps Behind Logins

If you need to screenshot a map inside a password-protected dashboard or internal tool, a standard public URL capture will fail. You must authorize GrabzIt to view the page.

You can achieve this by using the Import Cookies method. This passes your active session cookies to the GrabzIt API, allowing it to "log in" as you and capture the exact map state visible to your user.

5. Full Page Captures

The ability to create a full screen or full length screenshot is another useful feature. If your map is embedded in a long report, this ensures the entire scrolling content is captured without cutting off map data.

Of course this technique will work with any style of map whether it be a satellite imagery street map, street views or Google Earth!