import Translator from '../../lang/translator'; import DrawTool, { DrawToolOptions } from './DrawTool'; export type DistanceToolOptions = { mode?: string; language?: string; metric?: boolean; imperial?: boolean; symbol?: any; vertexSymbol?: any; labelOptions?: any; decimalPlaces?: number; formatLabelContent?: any; clearButtonSymbol?: any; zIndex?: number; } & DrawToolOptions; /** * 距离测量工具类 * * @english * A map tool to help measure distance on the map * @category maptool * @extends DrawTool * @example * var distanceTool = new DistanceTool({ * 'once' : true, * 'symbol': { * 'lineColor' : '#34495e', * 'lineWidth' : 2 * }, * 'vertexSymbol' : { * 'markerType' : 'ellipse', * 'markerFill' : '#1bbc9b', * 'markerLineColor' : '#000', * 'markerLineWidth' : 3, * 'markerWidth' : 10, * 'markerHeight' : 10 * }, * 'language' : 'en-US' * }).addTo(map); * */ declare class DistanceTool extends DrawTool { options: DistanceToolOptions; translator: Translator; /** * 配置项 * * @param options=null - construct options * @param options.language=zh-CN - language of the distance tool, zh-CN or en-US * @param options.metric=true - display result in metric system * @param options.imperial=false - display result in imperial system. * @param options.symbol=null - symbol of the line * @param options.vertexSymbol=null - symbol of the vertice * @param options.labelOptions=null - construct options of the vertice labels. */ constructor(options: DistanceToolOptions); /** * 清空测量 * * @english * Clear the measurements * @return {DistanceTool} this */ clear(): this; /** * 获取在绘制图形期间的DrawToolLayers * * @english * Get the DrawToolLayers with the geometries drawn on the map during measuring. * @return {Array} */ getMeasureLayers(): any[]; /** * 获取最后测量结果 * * @english * Get last measuring result * @return {Number} */ getLastMeasure(): string | number; /** * 撤消绘图,仅适用于点击/删除模式 * * @english * Undo drawing, only applicable for click/dblclick mode * @return {DistanceTool} this */ undo(): this; /** * 重做绘图,只适用于click/dblclick模式 * * @english * Redo drawing, only applicable for click/dblclick mode * @return {DistanceTool} this */ redo(): this; } export default DistanceTool; //# sourceMappingURL=DistanceTool.d.ts.map