-
Notifications
You must be signed in to change notification settings - Fork 109
IITC plugin migration guide
This guide provides step-by-step instructions on migrating existing IITC plugins to the new IITC API, introduced to replace previous internal window.*
namespace functions with a more powerful and user-friendly IITC.*
namespace.
-
Checking for API Availability: Instead of checking the IITC build date or version to determine if a certain API is available, check for the existence of the method itself.
Bad Practice:
if (iitcBuildDate <= '2023-11-20-071719') { /* ... */ }
Good Practice:
if (typeof IITC !== 'undefined' && typeof IITC.toolbox !== 'undefined') { /* ... */ }
-
Avoid Overwriting or Modifying API Methods: If the existing API does not meet your requirements, instead of modifying or overwriting the API methods, submit an issue requesting the needed functionality. This ensures the future compatibility of your plugin with API updates and improves compatibility with other plugins.
Introduced in IITC-CE v0.38.0
The Filters API allows hiding intel entities based on their properties (e.g., faction, health, timestamp). It provides a two-level API: a set of named filters that apply globally and a low-level API for generic purposes.
Example Usage:
{ portal: true, data: ['not', { history: { scoutControlled: false }, ornaments: ['some', 'sc5_p'] }] }
This filter configuration hides all portals except those never scout controlled and having a scout volatile ornament.
Documentation: Filters API Documentation
Introduced in IITC-CE v0.38.0
The Toolbox API facilitates the management of plugin buttons in the toolbox, allowing for the addition, editing, deletion of buttons, and sorting order modification.
Example Replacement: Instead of directly manipulating the DOM to add buttons:
$('#toolbox').append('<a onclick="window.plugin.myplugin.openDialog(); return false;">Test Button</a>');
Use the Toolbox API like this:
IITC.toolbox.addButton({
id: 'mybtn',
label: 'Test Button',
action: window.plugin.myplugin.openDialog
});
Documentation: Toolbox API Documentation
For IITC users
-
Guide on how to migrate data from an legacy version of IITC Mobile
-
(click to expand )
Cache (Data caching to prevent reloading)
Controls (Map controls/widgets)
Draw (Allow drawing things onto the current map so you may plan your next move)
Highlighter (Portal highlighters)
- Hide portal ownership
- Highlight portals by level color
- Highlight inactive portals
- Highlight portal weakness
- Highlight high level portals
- Highlight portals by my level
- Highlight portals with ornaments
- Highlight portals that need recharging
- Highlight portals with ornaments
- Highlight portals that need recharging
- Highlight portals missing resonators
- Highlight portals with infrastructure problems
Info (Display additional information)
- Available AP statistics
- Portal count
- Portals list
- Player level guess
- Localized scoreboard
- Missions
- Scoring cycle / checkpoint times
- Layer count
Layer (Additional map layers)
- Find farms on map
- Portal Level Numbers
- Overlay KML / GPX / GeoJSON
- Ingress scoring regions
- Zaprange
- Player activity tracker
- Portal Names
- Keys on map
Map Tiles (Alternative map layers)
- Stamen.com map layers
- Blank map
- Gray Google map
- Bing maps
- OpenStreetMap.org map
- Gaode (高德地图) / AutoNavi map
- Kartverket.no maps (Norway)
- Yandex maps
Portal Info (Enhanced information on the selected portal)
Tweaks (Adjust IITC settings)
Misc (Unclassified plugins)
For plugin developers
For IITC developers