Pokemon Go Map HowTo

Yes, I did get the Pokemon GO fever, and yes, I hate the 3-step bug. It doesn't even show you which one is the closest! And even when it worked, you really should at least have a better way to triangulate the pokemon.

Anyway, here is a quick guide to how to set up your local map. Do keep in mind that using it does apparently conflict with the TOS.

You'll need:

  • A windows PC (desktop at home, laptop, doesn't matter) with internet access
  • Either a Pokemon Club (register here) account or a Google account (in either case, DO NOT use your main account.)
  • A place in mind that you want to keep mapped
  • A Google account
  • Understand the relatively simple steps "run this installer", "unzip it", "open a command line and navigate to here" and "rename the file"
Note: I'll be referring to the program as tool or map tool.

1. step: getting the program

Go here and click on "Clone or Download" then on "Download Zip"

Save it to a location you'll remember. As this is a zip file, you'll need to unzip it to run the tool. Do so.

2. step: installing stuff required by the server

First, you'll need to download and install Python. Click here, and download an installer for your system. This'll probably mean this one. Then start the installer you get. You'll need to check the "add python to the PATH" where you select the components.

Now download this other file and run it. It does not matter where you place it.

After finishing with that, open a command line and navigate to the directory where you unzipped the map tool. Enter the PokemonGo-Map-develop directory, and run the following command:

pip install -r requirements.txt

This means we have installed all dependencies for the map tool.

3. step: get a Google Maps API browser key

Arguably the most difficult step. Thankfully, Google itself has a guide for it. You don't want a premium key, just a standard browser key.

Note: it does no matter what account you get the API key from. This key does not get transmitted to the game servers.

the relevant part
It's not rocket science, but it is aimed at developers, so perhaps a bit fiddly. When you get your key (it should look something like this: ), navigate to the PokemonGo-Map-develop directory, and find the file credentials.example.json. Remove the .example from the name, so it stays as credentials.json. Open it with any text editor (Notepad even), and put your key between the empty double quotes next to the gmaps_key text. It should look something like this:

Save the file and exit.

Update: newer versions of the map have the file in a separate config directory.

4. step: get a location

We'll have to google maps to get the coordinates of the location you want mapped. Alternatively, you can use any other text that a google maps search will take you to it, like an address, the name of the city, or something famous and unique, like Central Park. If that's good enough for you, go to step 5, just be sure to check it with a quick google maps search.

Anyway, start google maps and navigate to your center point. You will see that the address contains something like @47.4655134,19.0876869,17z.  These are your coordinates, you'll need the first two, without the @, with a space between, and without the final 17z or somesuch. Two examples with the parts highlighted:

If you have a pip (that orange marker) active, the coordinates will be the pip's coordinates
If you don't have a pip, the coordinates will be that of the very center of the screen

5. step: running the map

Open a command line and navigate to the PokemonGo-Map-develop directory. You'll need to construct your command out of your login credentials and the location you picked.

If you have a Pokemon Club account, you'll have to start with the following:
python runserver.py -a ptc -u username -p password -l "location" -st 10
Just replace username, password and location with those.

If you use a google account, you'll have to start with the following:
python runserver.py -a google -u username@gmail.com -p password -l "location" -st 10

Same thing. Don't forget the @gmail.com. Also, if you have 2-factor authentication, you'll have to create an app password for the map tool. Here is the relevant help section by Google.

Note: if your password contains space, put the whole password in with double quotes, like "password with space". I think it'll work that way, I did not try.

You can increase or decrease the mapped area by changing the -st 10 part. This 10 means it will search a 10*10 step area. Lower it, and the map will cover less area, but the refresh speed will be much faster. Higher means more map, but you might only get notified of a Pokemon when it is too far away and/or has too little time remaining for you to be able to catch it. I use 5-6 at home, on foot.

Enter the finished command, and voila, your Pokemon Map server is running!

6. step: accessing the map

Open your favourite web browser, and navigate to http://localhost:5000 (or just click the link.) That's it, you are done! Well, on the left side menu you can disable Pokestops and Gyms.

Special thanks
First, to the contributors of the map, second, to IPostStupidThings, the author of the original guide on reddit.

No comments: