iconpath 微信小程序_【报Bug】微信小程序 map 标记点iconPath图标 苹果手机 不能单个设置了。以前没有问题。现在不知道为啥不行了...
產(chǎn)品分類:
uniapp/小程序/微信
PC開(kāi)發(fā)環(huán)境操作系統(tǒng):
Windows
PC開(kāi)發(fā)環(huán)境操作系統(tǒng)版本號(hào):
win7
HBuilderX類型:
正式
HBuilderX版本號(hào):
3.0.3
第三方開(kāi)發(fā)者工具版本號(hào):
1.3.2011120
基礎(chǔ)庫(kù)版本號(hào):
2.14.1
項(xiàng)目創(chuàng)建方式:
HBuilderX
操作步驟:
var obj = {};
$this.gcj=$this.wgs84togcj02($this.map.markers[i].longitude,$this.map.markers[i].latitude);
console.log($this.gcj);
$this.map.markers[i].latitude =$this.gcj[1];
$this.map.markers[i].longitude = $this.gcj[0];
$this.map.markers[i].iconPath = $this.map.markers[i].icon;
$this.map.markers[i].width = 50;
$this.map.markers[i].height = 50;
$this.map.markers[i].id = i;
obj.content = $this.map.markers[i].name;
obj.color = "#262628";
obj.fontSize = 20;
obj.bgColor = "#FFFFFF";
obj.padding = 5;
obj.borderRadius = 10;
obj.borderColor = "#EEEEEE";
obj.display = "BYCLICK";
$this.map.markers[i].callout = obj;
} ```
預(yù)期結(jié)果:
var obj = {};
$this.gcj=$this.wgs84togcj02($this.map.markers[i].longitude,$this.map.markers[i].latitude);
console.log($this.gcj);
$this.map.markers[i].latitude =$this.gcj[1];
$this.map.markers[i].longitude = $this.gcj[0];
$this.map.markers[i].iconPath = $this.map.markers[i].icon;
$this.map.markers[i].width = 50;
$this.map.markers[i].height = 50;
$this.map.markers[i].id = i;
obj.content = $this.map.markers[i].name;
obj.color = "#262628";
obj.fontSize = 20;
obj.bgColor = "#FFFFFF";
obj.padding = 5;
obj.borderRadius = 10;
obj.borderColor = "#EEEEEE";
obj.display = "BYCLICK";
$this.map.markers[i].callout = obj;
} ```
實(shí)際結(jié)果:
var obj = {};
$this.gcj=$this.wgs84togcj02($this.map.markers[i].longitude,$this.map.markers[i].latitude);
console.log($this.gcj);
$this.map.markers[i].latitude =$this.gcj[1];
$this.map.markers[i].longitude = $this.gcj[0];
$this.map.markers[i].iconPath = $this.map.markers[i].icon;
$this.map.markers[i].width = 50;
$this.map.markers[i].height = 50;
$this.map.markers[i].id = i;
obj.content = $this.map.markers[i].name;
obj.color = "#262628";
obj.fontSize = 20;
obj.bgColor = "#FFFFFF";
obj.padding = 5;
obj.borderRadius = 10;
obj.borderColor = "#EEEEEE";
obj.display = "BYCLICK";
$this.map.markers[i].callout = obj;
} ```
總結(jié)
以上是生活随笔為你收集整理的iconpath 微信小程序_【报Bug】微信小程序 map 标记点iconPath图标 苹果手机 不能单个设置了。以前没有问题。现在不知道为啥不行了...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 8 list切片_Python中14个切
- 下一篇: mysql 预编译_PHP中MySQL的