A client for map data.

Example

foxhole.map

Hierarchy

  • BaseClient
    • MapClient

Methods

  • Fetch public dynamic map data for a given map.

    Dynamic map data includes map icons that could change over the lifecycle of a map. This includes static bases and static base build sites. Team-specific data for and forward bases are excluded. This data may update every 3 seconds.

    Parameters

    • mapName: string

      The map name to get data for

    Returns Promise<Map.Data>

    The public dynamic map data

    Example

    const dynamicPublicMapData = await foxhole.map.fetchDynamicPublicData('StonecradleHex');
    
  • Fetch a list of all map names.

    Returns Promise<string[]>

    A list of all map names

    Example

    const mapNames = await foxhole.map.fetchMapNames();
    
  • Fetch static map data for a given map.

    Static map data includes things that never change over the lifecycle of a map. This includes map text labels, resource nodes, and world structures. You only need to request this once per map between World Conquests.

    Parameters

    • mapName: string

      The map name to get data for

    Returns Promise<Map.Data>

    The static map data

    Example

    const staticMapData = await foxhole.map.fetchStaticData('StonecradleHex');
    
  • Fetch the number of enlistments, casualties, and other map specific information for a given map.

    Parameters

    • mapName: string

      The map name to get data for

    Returns Promise<Map.WarReport>

    The number of enlistments, casualties, and other map specific information

    Example

    const warReport = await foxhole.map.fetchWarReport('StonecradleHex');