/PokemonGo-Map-GUI-PHP

A PHP implementation of PokemonGo-Map's GUI.

Primary LanguageCSSGNU Affero General Public License v3.0AGPL-3.0

PokemonGo-Map-GUI-PHP

A PHP implementation of PokemonGo-Map's GUI.

This implementation is fairly basic. I run my map with a fixed location and search control disabled, so such things have been disabled or not written in the code.

Requirements:

  • Existing MySQL database created by PokemonGo-Map
  • PHP >= 5.4 (with mod_rewrite enabled)

Setting up config.inc.php

$startingLat and $startingLng ----------------------------- These coordinates mark where the "fixed location" for PokemonGo-Map is. Location settings are still available to start at the user's location. NOTE: Geolocation using the Google Maps API requires a secure origin. If you're running this setup without an SSL certificate, then your browser options are limited if you want geolocation to work. Firefox seems to work nicely without SSL.

$dbHost, $dbName, $dbUser, and $dbPass

These are the credentials for your MySQL database. I didn't add any support for other database types, since MySQL is my preference.

$title

This marks the title that is shown in the title bar when visiting your map.

$locale

This is mostly for aesthetics and for reference should you want to implement language changes. With the code how it is, it only affects the lang specifier in the HTML. If you'd like it to change languages based on this option, you'll need to implement the code necessary to do it. To do so, refer to the i8ln(word) function in 'utils.py' from PokemonGo-Map and the get_pokemon_data($pokemon_id) function in 'utils.php' from this implementation

$gmapsKey

This is your Google Maps API key.

$purgeData

If you don't want the map to purge old pokemon data, then leave this option at 0. Otherwise, input a higher number to delete pokemon spawns older than X hour(s). X is the number you'd place here.

Take care to leave all existing quotations intact. Once you've edited 'config.inc.php' to your liking, simply upload all the files to your web server, and it's good to go. That's it! It doesn't get any simpler. Keep in mind that I wrote this to fulfill my needs, and it may be missing some things that the official GUI has. It also doesn't include any functionality to control workers in any way, since I prefer spawnpoint scanning in certain areas. I do not plan on extending the functionality of this implementation any further than it currently is. If you'd like to, feel free. :)

Credits: PokemonGo-Map