Maps Region Switcher: a browser extension that loads Google Maps as it appears in another country

Maps Region Switcher promo banner

With the assistance of Claude AI (and motivated by recent geopolitical events), I created a browser extension to change the region Google Maps uses in your browser. Changing the region shows you what Google Maps looks like in that country, and it effectively remedies incorrect labels like “Lake America” on the map. Give it a try – available for Chrome and Firefox. (Edge coming soon!)

Chrome:
chromewebstore.google.com/detail/maps-region-switcher/fmbelciakdlpbepnbjefifbjaopmgcfd

Firefox:
addons.mozilla.org/en-US/firefox/addon/maps-region-switcher

Edge:
microsoftedge.microsoft.com/addons/detail/ljmehlelmabkidhifpfhpnnkijnkpkep

This is 100% Free and Open Source Software (FOSS), published with an MIT license, so feel free to do anything you want with this code: inspect it, run it, critique it, use it in your project, repackage it and sell it for profit, or ignore it all together. Just keep the MIT license πŸ˜‰

The motivating case

Google Maps renders certain place names, labels, and other content differently depending on which region it associates with your view. That variation is Google’s own region-dependent behavior, not universal across regions, so switching the region parameter changes which version you see, using Google’s own rendering for that region, not a workaround or an overlay.

Google Maps at gl=CA, rendered by Google exactly as it serves the map to Canada.

Why this approach?

Google Maps draws basemap labels into a WebGL canvas from vector tiles. There is no DOM node to rewrite, so the obvious approaches like overlaying a replacement label or patching the tiles which intersect the feature, won’t work (and won’t stay within the Google Maps terms of use).

Setting the region instead produces Google’s own rendering with correct font, halo, placement, line-breaking, at every zoom level, and it keeps working when Google changes its internals. It also modifies none of Google’s content, which matters for both the Maps terms and store review.

Verified against live Google Maps rendering, 2026-08-30: adding ?gl=<region> to a Maps URL changes region-dependent content exactly as Google serves it for that region, including certain place labels, attribution text, and interface language, with no additional handling required on the extension’s part.

How it works

Two dynamic declarativeNetRequest rules, rebuilt from chrome.storage.local (browser.storage.local on Firefox) whenever the popup changes a setting:

RulePriorityActionMatches
Guard2allowMaps URLs that already have gl=
Redirect1redirectAny top-level Maps navigation

The redirect uses queryTransform.addOrReplaceParams, so it only ever touches the query string β€” Maps keeps its !-encoded data in path segments, which are left alone. It applies to every Maps load, everywhere β€” there is no scoping.

An earlier version restricted the redirect to a small set of hard-coded map viewports, on the theory that changing gl invalidated the basemap tile cache and caused the map to blank while zooming. Both parts of that turned out wrong: the blanking happens with the extension disabled too (it’s Google Maps’ own rendering), and the scoped rule rarely fired anyway, because Maps is a single-page app β€” searching or panning to a new place doesn’t produce a new navigation for a URL-based rule to match. The option was removed rather than left as a checkbox that mostly did nothing.

The region parameter does still change the basemap tile URLs:

no gl: ...!3i792558794!3m8!2sen!3sus!5e1105!12m4...
gl=CA: ...!3i792558794!3m7!2sen!5e1105!12m4...
^^^ region field gone

That’s real and inherent β€” different labels require different tiles β€” but it’s a one-time refetch per tile, not the zoom-blanking behaviour above.

The guard rule is the loop protection. Without it we would be relying on the browser silently dropping a redirect whose transform yields an identical URL; an explicit higher-priority allow is the deterministic way to stop processing a request that has already been rewritten.

The region has to be present on the initial document request, which is why this is DNR and not a content script β€” a content script runs long after the region has been resolved.

Known trade-off

Parameter gl sets your region, not one label. Expect other region-dependent behaviour to change too: the attribution bar switches to the selected country’s terms links, other place names change, and local business results skew toward that country, and label language follows the region (gl=MX renders a Spanish interface). That is inherent to the mechanism, which is why the popup exposes an explicit toggle and region picker rather than silently rewriting every Maps load.

Leave a comment