Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more ts types #375

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions packages/types/src/overlay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ declare namespace AMap {
/** 获取覆盖物锚点 */
getAnchor(): string | Vector | undefined;
/** 设置覆盖物位置 */
setPosition(position: Vector): void;
setPosition(position: Vector | LngLat | [number, number]): void;
/** 获取覆盖物位置 */
getPosition(): Vector;
/** 将覆盖物设置到地图上 */
Expand Down Expand Up @@ -463,7 +463,7 @@ declare namespace AMap {
/** 设置圆中心点 */
setCenter(center: LngLatLike): void;
/** 设置圆形的半径 */
setRaius(radius: number): void;
setRadius(radius: number): void;
/** 获取圆中心点 */
getCenter(): LngLat;
/** 获取圆形的半径 */
Expand All @@ -478,6 +478,7 @@ declare namespace AMap {
setExtData(extData: any): void;
/** 获取圆形的属性 */
getOptions(): CircleOptions;
setMap(map: Map | null): void;
destroy(): void;
}
interface CircleEvents extends EventsCommonProps { }
Expand Down Expand Up @@ -539,7 +540,7 @@ declare namespace AMap {
class CircleMarker extends MapEventListener<'hide' | 'show' | 'mouseover' | 'touchend' | 'click' | 'touchmove' | 'rightclick' | 'mouseup' | 'mouseout' | 'touchstart' | 'mousedown' | 'dblclick'> {
constructor(opts: CircleMarkerOptions);
/** 设置圆点的半径 */
setRaius(radius: number): void;
setRadius(radius: number): void;
/** 获取圆点中心 */
getCenter(): LngLat;
/** 获取圆点的半径 */
Expand Down Expand Up @@ -1115,7 +1116,7 @@ declare namespace AMap {
addTo(map: Map): void;
add(map: Map): void;
getPosition(): Vector | LngLat;
setPosition(position: Vector): void;
setPosition(position: Vector | LngLat | [number, number]): void;
getAnchor(): string | Vector | undefined;
Text(anchor: string): void;
getOffset(): Vector | Pixel | undefined | Array<number>;
Expand Down