import { Color } from '@ngageoint/color-js'; import { BaseGrids } from '@ngageoint/grid-js'; import { Grid } from './Grid'; import { GridLabeler } from './GridLabeler'; import { GridType } from './GridType'; import { ZoomGrids } from './ZoomGrids'; /** * Grids */ export declare class Grids extends BaseGrids { /** * Grids */ private gridMap; /** * Create with grids to enable * * @param types * grid types to enable * @return grids */ static create(types?: GridType[]): Grids; /** * Create only Grid Zone Designator grids * * @return grids */ static createGZD(): Grids; /** * Constructor * * @param types * grid types to enable */ constructor(types?: GridType[]); /** * {@inheritDoc} */ getDefaultWidth(): number; /** * {@inheritDoc} */ grids(): Grid[]; /** * Create a new grid, override to create a specialized grid * * @param type * grid type * @return grid */ protected newGrid(type: GridType): Grid; /** * {@inheritDoc} */ protected newZoomGrids(zoom: number): ZoomGrids; /** * Create the grids * * @param enabled * enable created grids */ private createGrids; /** * Create the grid * * @param type * grid type * @param styles * propagate grid styles * @param enabled * enable created grids * @param labeler * grid labeler */ private createGrid; /** * Load grid styles within a higher precision grid * * @param grid * grid * @param gridKey * grid key * @param styles * propagate grid styles */ private loadGridStyles; /** * Load a grid style within a higher precision grid * * @param grid * grid * * @param gridKey * grid key * @param gridType * style grid type * @param styles * propagate grid styles */ private loadGridStyle; /** * Get the grid * * @param type * grid type * @return grid */ getGrid(type: GridType): Grid | undefined; /** * Get the grid precision for the zoom level * * @param zoom * zoom level * @return grid type precision */ getPrecision(zoom: number): GridType | undefined; /** * Set the active grid types * * @param types * grid types */ setGridTypes(types: GridType[]): void; /** * Set the active grids * * @param grids * grids */ setGrids(grids: Grid[]): void; /** * Enable grid types * * @param types * grid types */ enableTypes(types: GridType[]): void; /** * Disable grid types * * @param types * grid types */ disableTypes(types: GridType[]): void; /** * Is the grid type enabled * * @param type * grid type * @return true if enabled */ isEnabled(type: GridType): boolean; /** * Enable the grid type * * @param type * grid type */ enableByType(type: GridType): void; /** * Disable the grid type * * @param type * grid type */ disableByType(type: GridType): void; /** * Set the grid minimum zoom * * @param type * grid type * @param minZoom * minimum zoom */ setMinZoomByType(type: GridType, minZoom: number): void; /** * Set the grid maximum zoom * * @param type * grid type * @param maxZoom * maximum zoom */ setMaxZoomByType(type: GridType, maxZoom: number): void; /** * Set the grid zoom range * * @param type * grid type * @param minZoom * minimum zoom * @param maxZoom * maximum zoom */ setZoomRangeByType(type: GridType, minZoom: number, maxZoom: number): void; /** * Set the grid minimum level override for drawing grid lines * * @param type * grid type * @param minZoom * minimum zoom level or null to remove */ setLinesMinZoom(type: GridType, minZoom: number): void; /** * Set the grid maximum level override for drawing grid lines * * @param type * grid type * @param maxZoom * maximum zoom level or null to remove */ setLinesMaxZoom(type: GridType, maxZoom?: number): void; /** * Set all grid line colors * * @param color * grid line color */ setAllColors(color: Color): void; /** * Set all grid line widths * * @param width * grid line width */ setAllWidths(width: number): void; /** * Delete propagated styles for the grid types * * @param types * grid types */ deletePropagatedStyles(types?: GridType[]): void; /** * Set the grid type precision line color for the grid types * * @param types * grid types * @param precisionTypes * precision grid types * @param color * grid line color */ setColor(types: GridType[], color: Color, precisionTypes?: GridType[]): void; /** * Set the grid type precision line width for the grid types * * @param types * grid types * @param precisionType * precision grid type * @param width * grid line width */ setWidth(types: GridType[], width: number, precisionTypes?: GridType[]): void; /** * Get the labeler for the grid type * * @param type * grid type * @return labeler or null */ getLabeler(type: GridType): GridLabeler; /** * Has a labeler for the grid type * * @param type * grid type * @return true if has labeler */ hasLabeler(type: GridType): boolean; /** * Set the labeler for the grid type * * @param type * grid type * @param labeler * labeler */ setLabeler(type: GridType, labeler: GridLabeler): void; /** * Disable all grid labelers */ disableAllLabelers(): void; /** * Enable the labelers for the grid types * * @param types * grid types */ enableLabelers(types: GridType[]): void; /** * Disable the labelers for the grid types * * @param types * grid types */ disableLabelers(types: GridType[]): void; /** * Is a labeler enabled for the grid type * * @param type * grid type * @return true if labeler enabled */ isLabelerEnabled(type: GridType): boolean; /** * Enable the grid type labeler * * @param type * grid type */ enableLabeler(type: GridType): void; /** * Disable the grid type labeler * * @param type * grid type */ disableLabeler(type: GridType): void; /** * Get the labeler for the grid type * * @param type * grid type * @return labeler or null */ private getRequiredLabeler; /** * Set the grid minimum zoom * * @param type * grid type * @param minZoom * minimum zoom */ setLabelMinZoom(type: GridType, minZoom: number): void; /** * Set the grid maximum zoom * * @param type * grid type * @param maxZoom * maximum zoom */ setLabelMaxZoom(type: GridType, maxZoom: number): void; /** * Set the grid zoom range * * @param type * grid type * @param minZoom * minimum zoom * @param maxZoom * maximum zoom */ setLabelZoomRange(type: GridType, minZoom: number, maxZoom: number): void; /** * Set the label grid edge buffer for the grid types * * @param buffer * label buffer (greater than or equal to 0.0 and less than 0.5) * @param types * grid types */ setLabelBuffer(buffer: number, types: GridType[]): void; /** * Get the label grid edge buffer * * @param type * grid type * @return label buffer (greater than or equal to 0.0 and less than 0.5) */ getLabelBuffer(type: GridType): number; /** * Set all label colors * * @param color * label color */ setAllLabelColors(color: Color): void; /** * Set the label color for the grid types * * @param color * label color * @param types * grid types */ setLabelColor(color: Color, types: GridType[]): void; /** * Set all label text sizes * * @param textSize * label text size */ setAllLabelTextSizes(textSize: number): void; /** * Set the label text size for the grid types * * @param textSize * label text size * @param types * grid types */ setLabelTextSize(textSize: number, types: GridType[]): void; } //# sourceMappingURL=Grids.d.ts.map