maplibre-graticule
Version:
Graticuel / Grid plugin for MapLibre GL JS / Mapbox GL JS
46 lines (45 loc) • 1.04 kB
TypeScript
import { Map, LinePaint } from "maplibre-gl";
export interface GraticuleConfig {
minZoom?: number;
maxZoom?: number;
showLabels?: boolean;
labelType?: "hdms" | "decimal";
labelSize?: number;
labelColor?: string;
longitudePosition?: "top" | "bottom";
latitudePosition?: "left" | "right";
longitudeOffset?: number[];
latitudeOffset?: number[];
paint?: LinePaint;
}
export declare function randomString(): string;
export declare class MaplibreGraticule {
xid: string;
yid: string;
config: GraticuleConfig;
updateBound: () => void;
labelSize: any;
map: any;
constructor(config: GraticuleConfig);
/**
* @param {Map} map
* @returns {HTMLElement}
*/
onAdd(map: Map): HTMLElement;
/**
* @returns {void}
*/
onRemove(): void;
/**
* @returns {void}
*/
update(): void;
/**
* @returns {boolean}
*/
get active(): boolean;
/**
* @returns {GeoJSON.BBox}
*/
get bbox(): GeoJSON.BBox;
}