@uiw/react-amap-geolocation
Version:
鹰眼控件,用于显示缩略地图,显示于地图右下角,可以随主图的视口变化而变化,也可以配置成固定位置实现类似于南海附图的效果。
15 lines (14 loc) • 622 B
TypeScript
/// <reference types="@uiw/react-amap-types" />
import React from 'react';
import { OverlayProps } from '@uiw/react-amap-map';
export * from './useGeolocation';
export interface GeolocationProps extends OverlayProps, AMap.GeolocationEvents, AMap.GeolocationOptions {
/**
* 定位类型
* - position 获取 用户的精确位置,有失败几率
* - cityInfo 根据用户 IP 获取 用户所在城市信息
* @default position
*/
type?: 'position' | 'cityInfo';
}
export declare const Geolocation: React.ForwardRefExoticComponent<GeolocationProps & React.RefAttributes<GeolocationProps>>;