ingress-intel-total-conversion icon indicating copy to clipboard operation
ingress-intel-total-conversion copied to clipboard

View Portal Keys owned on map (C.O.R.E. members)

Open evertonberz opened this issue 4 years ago • 4 comments

Hi, as a C.O.R.E. subscription member, agents can see a list of portal keys in stock Intel.

Could you add a feature for this in IITC-CE? I think it could be a layer with pins at portals that you have keys. Similar to bookmark pins.

/r/getInventory provides the following structure:

    [
      "a8e2d7371xxxxxx obfuscated - I do not know what is this xxxxxx",
      16128362xxxxxx obfuscated - I do not know what is this xxxxxx,
      {
        "portalCoupler": {
          "portalGuid": "75f696ea68b646e68a084d933be61045.16",
          "portalLocation": "fe3ba2f0,fcf92482",
          "portalImageUrl": "http://lh3.googleusercontent.com/soxyL79o2Nj8i_Snf5KOiXw5nhJjMy0XJsDVrnAsP3zp63-O06qTyFmYgIYi16YtrFu6WrMXLm53APWHKjZlg3psVg",
          "portalTitle": "Prefeitura Municipal de Taquara",
          "portalAddress": "Rua Nelson Henck, 2851-3021, Taquara - Rio Grande do Sul, 95600-000, Brazil"
        },
        "resource": {
          "resourceType": "PORTAL_LINK_KEY",
          "resourceRarity": "VERY_COMMON"
        },
        "inInventory": {
          "playerId": "xxxxxx obfuscated xxxxxx.c",
          "acquisitionTimestampMs": "1612836237550"
        }
      }
    ]

It seems portal location is hashed but it's not using standard geohash. Any idea how to decode?

Thanks!

evertonberz avatar Feb 10 '21 16:02 evertonberz

You can try :

var [lat, lng] = item[2].portalCoupler.portalLocation
                        .split(',')
                        .map(a => (Number.parseInt(a,16)&(-1))*1e-6);

le-jeu avatar Feb 10 '21 17:02 le-jeu

To explain further, portalLocation is lat,lng multiplied by 1 million encoded as hexadecimal. The &(-1) handles the case were the value is negative. It's a trick that will interpret the value as signed 32 bit integer but will keep the value unchanged.

Jormund avatar Feb 10 '21 20:02 Jormund

If you want you can include my plugin to do that: https://github.com/EisFrei/IngressLiveInventory

EisFrei avatar Feb 12 '21 13:02 EisFrei

Could we just update the existing Keys plugin to use C.O.R.E keys?

fortepc avatar Jan 23 '22 22:01 fortepc