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

fix(weapp): Map attribute replenishment #14669

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
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
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 @@ -1859,6 +1866,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 @@ -1870,6 +1878,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 @@ -3555,6 +3569,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 @@ -3566,6 +3581,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 @@ -1719,6 +1726,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 @@ -1730,6 +1738,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 @@ -3091,6 +3098,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 @@ -3102,6 +3110,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 @@ -6065,6 +6079,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 @@ -6076,6 +6091,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 @@ -2387,6 +2394,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 @@ -2398,6 +2406,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