2025
JavaScript
Browser Extension
Tampermonkey
What the Script Does
This Tampermonkey script listens for internal network requests on GeoGuessr.com that contain hidden coordinate metadata from Google Maps. It extracts that data and allows you to open the exact location in Google Maps with one press of the 1 key.
How It Works
- 📡 Hooks into
XMLHttpRequest.prototype.opento intercept POST requests. - 🧠 Extracts coordinates using regex from Google Maps metadata.
- 🗺️ Stores them in a global object, then opens Google Maps on key press.
- ⌨️ Pressing 1 launches a new tab with the found location.
Script Code
// ==UserScript==
// @name Improved Script
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Script to open locations with encryption added and obfuscation.
// @author Gtafan
// @match https://www.geoguessr.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js
// ==/UserScript==
(function() {
'use strict';
let globalCoordinates = { lat: 0, lng: 0 };
var originalOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(method, url) {
if (method.toUpperCase() === 'POST' &&
(url.startsWith('https://maps.googleapis.com/$rpc/google.internal.maps.mapsjs.v1.MapsJsInternalService/GetMetadata') ||
url.startsWith('https://maps.googleapis.com/$rpc/google.internal.maps.mapsjs.v1.MapsJsInternalService/SingleImageSearch'))) {
this.addEventListener('load', function () {
let interceptedResult = this.responseText;
const pattern = /-?\d+\.\d+,-?\d+\.\d+/g;
let match = interceptedResult.match(pattern)[0];
let split = match.split(",");
globalCoordinates.lat = parseFloat(split[0]);
globalCoordinates.lng = parseFloat(split[1]);
});
}
return originalOpen.apply(this, arguments);
};
function mapsFromCoords() {
const { lat, lng } = globalCoordinates;
if (!lat || !lng) {
return;
}
window.open(`https://www.google.com/maps?q=${lat},${lng}&ll=${lat},${lng}&z=5`, '_blank', `width=${screen.availWidth},height=${screen.availHeight},left=0,top=0,scrollbars=yes,resizable=yes`);
}
document.addEventListener("keydown", function(e) {
if (e.keyCode === 49) { // Key '1'
e.stopImmediatePropagation();
mapsFromCoords();
}
});
})();
Copied to clipboard!
Demonstration
1. GeoGuessr Challenge: The original Street View location as seen during gameplay. You must guess your position based on the surroundings.
2. Resolver Output: The Tampermonkey script decoded the coordinates and opened this exact spot in Google Maps.
3. GeoGuessr Round Result: The game shows how close your guess was to the actual location, with a pin on the internal map.