TomTom Maps for JavaScript
    Preparing search index...

    Type Alias LatticeGridOptions<G>

    The options of a grid of hexagons or squares.

    type LatticeGridOptions<G extends CellGridShape> = {
        cellSizeKM: number;
        grid: G;
        gridOrigin?: Position;
    }

    Type Parameters

    Index
    cellSizeKM: number

    A cell's side in kilometres: a square's, or a hexagon's, which is also its centre-to-corner distance.

    grid: G
    gridOrigin?: Position

    The centre of one cell, which lays out the grid. Its latitude sets the cell size in degrees. Defaults to the centre of the points' bounding box.

    Pass the same position each time, such as your city's centre, to keep the cells in place while your points change.