All projects

Geoguessr Map Creator

A simple Python script to help create a custom map in the Geoguessr game.

Technologies
Python

Background

When my friend showed me the Geoguessr game, I instantly fell in love with the concept. If you’re not familiar, the premise is that you are placed in a random location in the world in Google street view. You then have to guess exactly where you are by looking around.

There is a feature to create a custom game by choosing locations on a map that you can then share and play with others. The problem with this is that if you want to play a map that you have created, you will know the locations in advance. What fun is a game that you’re guaranteed to win?

I noticed that they included an option to import a CSV file with coordinates, as an alternative to picking points on the map. I saw this as an opportunity to automate the custom map creation and allow myself to play the games as well as others. By having the computer pick the locations at random, I could play along with my friends and be at no advantage.

How it Works

The program works by randomly generating a pair of latitude/longitude coordinates, querying that location against the Google Maps Street View API to check if it exists, and saving each valid location in a CSV file. This file can then be imported into Geoguessr when creating a custom map.

For more information on the Google Maps API, visit: developers.google.com/maps

For more information on Geoguessr and to play, visit: geoguessr.com

View the code on GitHub

View source code