中文 | 日本語

Portal DB

A local portal database plugin for IITC on Niantic's Ingress Intel Map.

Portal DB passively collects portal records while you browse the Intel Map, stores them in IndexedDB, detects moved portals, and gives other IITC plugins a dependable source of portal coordinates and team state.

Who This Plugin Is For

Portal DB is mainly useful for agents and plugin authors who need a durable local record of portals that are not currently visible on screen. It is especially valuable for workflows that depend on portal history, moved portal detection, or reliable background data for planning and analysis.

Key Features

How It Works

The plugin intercepts raw entity data from the Intel Map and turns it into a local portal record set. Other plugins can then use this persistent layer as a portal lookup service, even when the requested portal is outside the current viewport.

This makes Portal DB a backend-style utility inside the IITC ecosystem rather than only a standalone visual tool.

API Reference

Portal DB exposes its functionality through window.plugin.portalDB. All access methods are asynchronous and return a Promise.

getPortal(guid)

Retrieves one portal record by GUID.

// Example: Check if a portal exists and log its coordinates
window.plugin.portalDB.getPortal('your-portal-guid')
  .then(portal => {
    if (portal) {
      console.log(`Found: ${portal.latE6}, ${portal.lngE6}`);
    } else {
      console.log('Portal not found in local DB');
    }
  });

getPortalsInBounds(bounds)

Retrieves all stored portals inside a map boundary.

// Example: Find all stored portals in the current map view
const bounds = map.getBounds(); // Leaflet LatLngBounds
window.plugin.portalDB.getPortalsInBounds(bounds)
  .then(results => {
    console.log(`Found ${results.length} portals in this area.`);
    results.forEach(p => console.log(p.guid, p.team));
  });

Return Object Structure

Methods return portal objects in the following standardized format:

{
  "guid": "...",
  "latE6": 35689500,
  "lngE6": 139691700,
  "team": "E",
  "lastSeen": 1707000000
}

How to Use Portal DB

  1. Browse the Intel Map normally and let the plugin collect portal data in the background.
  2. Open the Portal DB toolbox entry when you want to inspect moved portals or review stored data.
  3. Use the Export and Import actions to back up or transfer your local database.
  4. If you build other IITC tools, call the exposed API methods to query portals outside the current viewport.

Note for developers: If your IITC plugin needs to answer “where is this portal?” for a GUID that is not currently rendered, Portal DB is the recommended local data source.

FAQ

Changelog

Version 0.3.0

Version 0.2.0

Version 0.1.2