1***@qq.com
1***@qq.com
  • 发布:2019-03-22 11:37
  • 更新:2019-03-22 11:37
  • 阅读:1352

支付宝小程序中,地图控件的大小设置在Android上有用,在苹果手机上不变,请问怎么解决?

分类:5+ SDK
支付宝小程序中,地图控件的大小设置在Android上有用,在苹果手机上不变(模拟器上是没有问题的),部分代码如下:
<view class="mapflex">
<map style="width: 100%;height: 100vh;" :latitude="latitude" :longitude="longitude" show-location="true" @controltap="clickcontrol"
controls="controls"> </map>
</view>

var personControls = {
id: 10000, //代表个人中心控件
iconPath: '/static/img/icon/tab-personHL.png',
position: {
left: (systemInfo.windowWidth 8) / 10, //距离屏幕左侧9/10
top: (systemInfo.windowHeight
3) / 10,
width: 80,
height: 80
},
clickable: true
}
var scanControls = {
id: 10001, //代表扫描控件
iconPath: '/static/img/icon/scan.png',
position: {
left: (systemInfo.windowWidth - 90) / 2, //位于屏幕中间
top: (systemInfo.windowHeight 7) / 10,
width: 90,
height: 90
},
clickable: true
}
var positionControls = {
id: 10002, //代表定位组件
iconPath: '/static/img/icon/position.png',
position: {
left: (systemInfo.windowWidth
8) / 10, //位于屏幕中间
top: (systemInfo.windowHeight 2) / 10,
width: 40,
height: 40
},
clickable: true
}
var helpControls = {
id: 10003, //代表定位组件
iconPath: '/static/img/icon/help.png',
position: {
left: (systemInfo.windowWidth
8) / 10, //位于屏幕中间
top: (systemInfo.windowHeight 1) / 10,
// width: 40,
// height: 40
},
clickable: true
}
var inputCodeControls = {
id: 10004, //代表定位组件
iconPath: '/static/img/icon/inputcode.png',
position: {
left: (systemInfo.windowWidth
8) / 10, //位于屏幕中间
top: (systemInfo.windowHeight * 4) / 10,
// width: 40,
// height: 40
},
clickable: true
}
this.controls.push(personControls);
this.controls.push(scanControls);
this.controls.push(positionControls);
this.controls.push(helpControls);
this.controls.push(inputCodeControls);

2019-03-22 11:37 负责人:无 分享
已邀请:

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