Skip to content

08. Additional Info

TurtIeSocks edited this page May 28, 2022 · 3 revisions

Webhook URL Routes

Formatting

  • Lat/Lon Format: https://www.yourMapUrl.com/@/:lat/:lon/:zoom
  • ID Format: https://www.yourMapUrl.com/id/:category/:id/:zoom

Explanation

  • These formats can be used with any webhook reporting service, such as Poracle and WhMgr.
  • All values with a : represent variables, so :lat would mean the latitude variable
  • ID format works for Pokemon, Gyms, Raids, Pokestops, Quests, Invasions, Lures, and Nests.
  • ID Format also opens the popup of the item with the matching ID, assuming that it matches the users' current filters.

Examples

  • Poracle: https://www.yourMapUrl.com/@/{{latitude}}/{{longitude}}/16
  • Poracle by ID: https://www.yourMapUrl.com/id/pokemon/{{encounter_id}}/18
  • Poracle by ID: https://www.yourMapUrl.com/id/raids/{{id}}/15

Adding New Locales

  • Add/Edit your locales JSON in the /public/base-locales folder
  • Then generate them with yarn create-locales
  • Some locales (such as reusable/general Pogo terms) may be better suited for the community powered Global Translation Repo that ReactMap utilizes.

Glow Options

You can add any number of rules in the glow array in the config. Be sure to add all of the keys or it will not work properly and may even cause issues. Glow can have a drastic impact on performance, use sparingly. The name field is not translated client side, set it to whatever your locale is. The Multiple field is what will be displayed if a Pokemon satisfies more than one rule, modifying or removing this rule could cause issues.

"glow": [
  {"name": "Hundo", "perm": "iv", "num": 100, "value": "#ff1744", "op": "=" },
  {"name": "Nundo", "perm": "iv", "num": 0, "value": "#000000", "op": "=" },
  {"name": "Top Ranks", "perm": "pvp", "num": 3, "value": "#0000ff", "op": "<=" },
  {"name": "Multiple", "perm": "pvp", "value": "#800080" }
]

Multiple Database Support

  • ReactMap supports any number of databases you wish to use. Simply add a new object using the same structure as the existing ones into the schemas array.
  • A note on the useFor fields for each schema. These fields represent model names, not table names. They must be spelled the exact same way that they are in local.example.json. Databases can have duplicates, ie, you can get Pokemon from multiple databases, except for user and session values.
  • If you are sourcing Pokestops and Gyms from multiple databases, if the two databases have overlap and only one has the latest raids or quests, the final results will not be what you expect due to optimizations in the merging function.
  • Different scanner databases, such as MAD and RDM, are supported simultaneously.

PVP Tracking

Regardless of the backend you're using you must add which leagues you want to parse to the leagues array, shown below.

    "pvp": {
      "leagues": [
        {
          "name": "great",
          "cp": 1500
        },
        {
          "name": "ultra",
          "cp": 2500
        },
        {
          "name": "little",
          "cp": 500
        }
      ],
      "levels": [
        50,
        51
      ],
      "reactMapHandlesPvp": false,<--- uses internal PVP engine to calculate stats
      "minCp": {
        "great": 1400,
        "ultra": 2400
      }
    },
  • If you're using Chuck as a parser you can add any number of leagues, CP caps, and PVP level caps to the respective arrays, just be sure to add the same keys to your Chuck config.
  • If you're using RDM and want more than just Little/Great/Ultra League, you can set reactMapHandlesPvp to true and add and number of leagues, CP caps, and PVP level caps to the respective arrays.
  • If you're using MAD and want PVP results you must set reactMapHandlesPvp to true and add any number of leagues, CP caps, and PVP level caps to the respective arrays

Multi Domain Support

ReactMap supports multiple domain config options. Under the "multiDomain" array in the config, set each object in the array to the domains you want to customize. Example format:

{
  "map": {
    "general": {
       headerTitle: "ReactMap",
       title: "ReactMap",
       startLat: 32.05,
       startLon: -20.00,
       startZoom: 5
    },
  },
  "multiDomains": [
    // Requests from Domain 1 will start at 0, 0, zoom of 20, and the custom titles
    {
      "domain": "domain1.map.net",
      "general": {
         "title": "ReactMap",
         "headerTitle": "ReactMap",
         "startLat": 0,
         "startLon": 0,
         "startZoom": 12,
      },
    },
    // Requests from Domain 2 will start at 11, 11, zoom of 10, and the default titles, "ReactMap"
    {
      "domain": "domain2.map.net": 
      "general": {
         "startLat": 80,
         "startLon": -10,
         "startZoom": 11,
      },
    },
    // Requests from Domain 3 will start at the default 32.05, -20.00 and have the custom title "The Coolest Map"
    {
      domain: "domain3.map.net"
      "general": {
         "title": "the coolest map",
         "startZoom": 8,
      },
    }
  ]
}

Any item in the map config section can be customized for multiDomains. Whatever your settings are in the original map section will become your default for all domains that don't specify a custom value.