Skip to content

Commit

Permalink
fix(weapp): Map attribute replenishment
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKonka committed Oct 17, 2023
1 parent ee423f5 commit 8055405
Show file tree
Hide file tree
Showing 31 changed files with 417 additions and 3 deletions.
49 changes: 46 additions & 3 deletions packages/taro-components/types/Map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ interface MapProps extends StandardProps {
* @supported weapp, alipay, swan, tt, qq, jd
*/
markers?: MapProps.marker[]
/** 标记点
/** **即将移除,请使用 markers**
* @supported weapp
* @deprecated
*/
covers?: any[]
/** 路线
Expand Down Expand Up @@ -217,14 +218,38 @@ interface MapProps extends StandardProps {
* @supported weapp, swan, qq
*/
onPoiTap?: CommonEventFunction<MapProps.onPoiTapEventDetail>
/** 点击地图路线时触发,e.detail = {longitude, latitude}
* @supported weapp, swan, qq
*/
onPolylineTap?: CommonEventFunction<MapProps.onPolylineTapEventDetail>
/** 地图能力生效时触发,e.detail = {ability, errCode, errMsg}
* @supported weapp
*/
onAbilitySuccess?: CommonEventFunction<MapProps.onAbilityEventDetail>
/** 地图能力失败时触发,e.detail = {ability, errCode, errMsg}
* @supported weapp
*/
onAbilityFailed?: CommonEventFunction<MapProps.onAbilityEventDetail>
/** 地图鉴权结果成功时触发,e.detail = {errCode, errMsg}
* @supported weapp
*/
onAuthSuccess?: CommonEventFunction<{ errCode: number; errMsg: string }>
/** MapContext.moveAlong 插值动画时触发。e.detail = {markerId, longitude, latitude, animationStatus: "interpolating" | "complete"}
* @supported weapp
*/
onInterpolatePoint?: CommonEventFunction<MapProps.onInterpolatePointEventDetail>
/** 组件错误时触发,例如创建或鉴权失败,e.detail = {longitude, latitude}
* @supported weapp
*/
onError: CommonEventFunction<MapProps.point>
/** 点击标记点对应的气泡时触发e.detail = {markerId}
* @supported weapp, swan, tt, jd
*/
onCallOutTap?: CommonEventFunction
onCallOutTap?: CommonEventFunction<MapProps.onCalloutTapEventDetail>
/** 点击定位标时触发,e.detail = {longitude, latitude}
* @supported weapp, tt
*/
onAnchorPointTap?: CommonEventFunction
onAnchorPointTap?: CommonEventFunction<MapProps.point>
/** 点击 panel 时触发。
* @supported alipay
*/
Expand Down Expand Up @@ -612,6 +637,24 @@ declare namespace MapProps {
longitude: number
latitude: number
}

interface onPolylineTapEventDetail {
polylineId: number
longitude: number
latitude: number
}
interface onAbilityEventDetail {
ability: string
errCode: number
errMsg: string
}

interface onInterpolatePointEventDetail {
markerId: number
longitude: number
latitude: number
animationStatus: 'interpolating' | 'complete'
}
}
/** 地图。相关api Taro.createMapContext。
* @classification maps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -128,6 +129,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -131,6 +132,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -128,6 +129,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -128,6 +129,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down Expand Up @@ -1851,6 +1858,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -1862,6 +1870,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down Expand Up @@ -3539,6 +3553,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -3550,6 +3565,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -130,6 +131,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down Expand Up @@ -1711,6 +1718,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -1722,6 +1730,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -91,6 +92,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -128,6 +129,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -128,6 +129,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down Expand Up @@ -3083,6 +3090,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -3094,6 +3102,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down Expand Up @@ -6049,6 +6063,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -6060,6 +6075,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -153,6 +154,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down Expand Up @@ -2379,6 +2386,7 @@ require("./taro");
"show-compass": _false,
"show-scale": _false,
"enable-overlooking": _false,
"enable-auto-max-overlooking": _false,
"enable-zoom": _true,
"enable-scroll": _true,
"enable-rotate": _false,
Expand All @@ -2390,6 +2398,12 @@ require("./taro");
bindLabelTap: _empty,
bindRegionChange: _empty,
bindPoiTap: _empty,
bindPolylineTap: _empty,
bindAbilitySuccess: _empty,
bindAbilityFailed: _empty,
bindAuthSuccess: _empty,
bindInterpolatePoint: _empty,
bindError: _empty,
bindAnchorPointTap: _empty
},
Button: {
Expand Down
Loading

0 comments on commit 8055405

Please sign in to comment.