react-native-amap-geolocation icon indicating copy to clipboard operation
react-native-amap-geolocation copied to clipboard

interface Location类型定义有不匹配的地方

Open jefn76 opened this issue 3 years ago • 1 comments

调用Geolocation.getCurrentPosition()的时候,position打印出来的数据和当前类型定义文件不匹配。 这是打印出来的数据: image

这是当前文件类型: export interface Location { accuracy: number; latitude: number; longitude: number; altitude?: number; speed?: number; heading?: number; timestamp?: number; errorCode?: ErrorCode; errorInfo?: string; locationDetail?: string; locationType?: LocationType; gpsAccuracy?: GpsAccuracy; coordinateType?: "WGS84" | "GCJ02"; trustedLevel?: TrustedLevel; }

jefn76 avatar Feb 14 '23 07:02 jefn76

position 的类型是这个

https://github.com/qiuxiang/react-native-amap-geolocation/blob/d3bc83100e3c6243b445d87a8fd6476bfd68e61e/src/geolocation.ts#L20-L29

而 location 的类型也没问题,只是有些字段没有标注出来。

qiuxiang avatar Feb 14 '23 07:02 qiuxiang