acio
acio
  • 发布:2021-04-13 16:15
  • 更新:2021-11-18 15:01
  • 阅读:1060

【报Bug】nvue页面的map,label设置x和y偏移值无效

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 20H2

HBuilderX类型: 正式

HBuilderX版本号: 3.1.8

手机系统: iOS

手机系统版本号: iOS 12.1

手机厂商: 苹果

手机机型: 6s

页面类型: nvue

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:
  1. 创建nvue页面
  2. 使用地图组件
  3. 创建markers

预期结果:

正常调整x和y值,使label居中显示在marker下方

实际结果:

无法变更x和y值label显示在marker下方,左侧与marker中心对齐

bug描述:

nvue页面使用map组件,设置label时,ios端无法改变label位置,android端正常;也尝试过anchorX和anchorY,anchorX有效,但是改不了y值,label会和markers重叠

marker.push({  
                            id: 0,  
                            latitude: self.latitude,  
                            longitude: self.longitude,  
                            iconPath: iconPath,  
                            width: 50,  
                            height: 50,  
                            anchor: {  
                                x: .5,  
                                y: 1  
                            },  
                            callout: {  
                                content: "描述信息",  
                                color: "#303030",  
                                fontSize: 14,  
                                borderRadius: 5,  
                                bgColor: "#FFFFFF",  
                                padding: 8,  
                                display: "ALWAYS",  
                                textAlign: "left"  
                            },  
                            label: {  
                                content: "123456",  
                                color: "#FFF",  
                                fontSize: 12,  
                                x: -26,  
                                y: 16,  
                                // anchorX: -26,  
                                // anchorY: -116,  
                                bgColor: "#303030",  
                                borderRadius: 3,  
                                padding: 3,  
                                textAlign: "center"  
                            }  
                        });  
                        self.markers = marker;
2021-04-13 16:15 负责人:DCloud_iOS_XHY 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

HBuilderX 3.1.10 alpha 已修复

  • acio (作者)

    已确认,label的偏移值改用anchorX和anchorY后能正常使用

    2021-04-16 16:14

DCloud_iOS_XHY

DCloud_iOS_XHY

请上传一下完整的示例工程,方便排查

DCloud_iOS_XHY

DCloud_iOS_XHY

感谢反馈,bug已确认

  • acio (作者)

    好的

    2021-04-15 15:09

老益

老益

ios能正常显示吗 我ios自定义标记地点显示不出来 安卓正常

该问题目前已经被锁定, 无法添加新回复