UNPKG

@fleet-frontend/mower-maps

Version:

a mower maps in google maps

32 lines 1.05 kB
/** * 坐标转换工具函数 * 模拟鼠标点击事件来获取十字准心位置的坐标 */ export interface Point { x: number; y: number; } /** * 检查点是否在SVG的可见区域内 * @param point SVG坐标点 * @param svgElement SVG元素 * @returns 是否在可见区域内 */ export declare const isPointInSvgBounds: (point: Point, svgElement: SVGSVGElement) => boolean; /** * 获取十字准心中心点对应的SVG坐标 * 直接使用SVG的CTM进行坐标转换,简化逻辑 * @param svgElement SVG元素 * @param mapInstance Google Maps实例 * @returns SVG坐标点 */ export declare const getScreenCenterSvgPoint: (svgElement: SVGSVGElement, mapInstance: any) => Point | null; /** * 将屏幕坐标转换为SVG坐标 * @param svgElement SVG元素 * @param clientX 屏幕X坐标 * @param clientY 屏幕Y坐标 * @returns SVG坐标点 */ export declare const screenToSvgCoordinates: (svgElement: SVGSVGElement, clientX: number, clientY: number) => Point; //# sourceMappingURL=coordinateUtils.d.ts.map