Skip to content
Alex Andries edited this page Apr 12, 2024 · 9 revisions

Geo Locator Guide

The free API key used on the website was being abused, so I decided to remove it. You now need to create your own API key to play.

Small guide to help you setup GeoLocator

Use the hosted version.

This is the simplest way to play the game. On the webpage of GeoLocator you can play the game without worrying to setup Firebase.

The only thing you need is a Google API Key. This key is needed to load Google Maps and Google Street View. Google offers up to 200$ of free key usage ( which is a lot of game time for a group of 3-6 players ), after that it costs for each API call. Unfortunately, I can't offer a personal key cause it would reach the usage cap pretty fast, but you can safely create one for yourself and use it for you and your friends only. The key looks something like this :

AIzaSyA3uf4UjepZAFsT3Gt7pDDOhvVdDq_LR2s

There is an Official Google Tutorial you can follow to create an API Key. You can also restrict that API Key to be used only on the Maps API and only on the GeoLocator website, like this :

Restriction example

After creating the key you simply need to paste it when you create a lobby. GeoLocator will start using that key when loading Maps.

I know this may scare you, but rest assured that by using a private key of yours, unless you play 20 hours a day it would be difficult to reach the data cap. Plus you can always check your usage and billing from the Google Cloud console and also remove that API Key completely.

GeoLocator will only store that API Key while you play, to share it with other people joining that lobby and will use it only during that session.

Host it yourself

To use it you need to setup your own .env with the firebase config like so :

REACT_APP_API_KEY= "YOUR-API-KEY"
REACT_APP_AUTHDOMAIN= "YOUR-DATA"
REACT_APP_BASEURL= "YOUR-DATA"
REACT_APP_PROJECT_ID= "YOUR-DATA"
REACT_APP_STORAGEBUCKET= "YOUR-DATA"
REACT_APP_MESSAGING_SENDER_ID= "YOUR-DATA"
REACT_APP_APP_ID= "YOUR-DATA"
REACT_APP_MEASUREMENT_ID= "YOUR-DATA"

You should also implement better security rules for for accessing real time database and quotas for the api key. You can then deploy it somewhere ( I use Firebase Hosting ) and limit it to your friends, so other people don't have access to it.

to do