TomTom Maps for JavaScript
    Preparing search index...

    Type Alias ToolState

    State passed to tool factory functions, organised by feature area. Each sub-state mixes lazy module access with the current service data produced during the session.

    function createMyTool(state: ToolState) {
    return tool({
    execute: async () => {
    const places = await state.places.getEntryPlacesModule('places-0', 'pin');
    state.routing.currentRoutes; // most recent routes
    state.baseMap.mapLibreMap; // MapLibre instance
    }
    });
    }
    type ToolState = {
        analyses: Analyses;
        baseMap: BaseMapState;
        byod: BYODState;
        codeExecution: SandboxExecutor;
        customGeometries: CustomGeometriesState;
        engine: JobEngine;
        mapPOIs: MapPOIsState;
        places: PlacesState;
        ranges: RangeState;
        routing: RoutingState;
        trackers: EventsState;
        trafficAreaAnalytics: TrafficAreaAnalyticsState;
        trafficIncidents: TrafficIncidentsState;
        trafficTiles: TrafficTilesState;
    }
    Index
    analyses: Analyses

    Single session-level registry of every analysis (one-shot + recurring) across all entry kinds. Results live here, and per-entry views read them on demand via Analyses.getAnalysesForEntry. analyseData registers a record and a job on JobEngine. monitorAnalysis toggles the job's active flag.

    baseMap: BaseMapState

    The displayed base map's style, language, viewport and layers.

    byod: BYODState

    Bring-your-own-data GeoJSON layers, customer-authored data the agent can read and render.

    codeExecution: SandboxExecutor

    Strategy used to run code-generation tools (analyseData, processData, createTracker, clusterIncidents). createToolState initialises it to the env-resolved executor, and createMapAgent re-resolves it with MapAgentOptions.codeExecution. Tools read this to select where sandbox code runs.

    customGeometries: CustomGeometriesState

    Derived/custom polygon entries that processData outputs.

    engine: JobEngine

    The single recurrence engine. Owners (analyses, trackers) register entry-anchored jobs and keep the returned handles. The engine re-runs each active job when its source entries change. It is generic and never interprets a job's recipe (the tools layer builds the run closure). See JobEngine.

    mapPOIs: MapPOIsState

    Map POI layer visibility, filtering and category management.

    places: PlacesState

    The places layer's PlacesModule and append-only search history.

    ranges: RangeState

    Reachable range results, with origin, budgets and bbox summaries.

    routing: RoutingState

    Route calculation, waypoint management, and planning parameter state.

    trackers: EventsState

    Generic trackers, rising-edge reducers fed by their own JobEngine jobs. A tracker fires an alert/event when its rule's Verdict crosses an edge (ingestVerdict). The slice keeps the durable TrackerEvent log.

    trafficAreaAnalytics: TrafficAreaAnalyticsState

    Traffic area analytics aggregation module, last result and viz config.

    trafficIncidents: TrafficIncidentsState

    Fetched traffic incident entry history and per-entry rendering.

    trafficTiles: TrafficTilesState

    Traffic flow tiles and incident overlay tiles.