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;
} ```

- 发布:2020-12-29 16:53
- 更新:2020-12-29 16:53
- 阅读:969
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win7
HBuilderX类型: 正式
HBuilderX版本号: 3.0.3
第三方开发者工具版本号: 1.3.2011120
基础库版本号: 2.14.1
项目创建方式: 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;
} ```
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;
} ```
实际结果:
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;
} ```
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;
} ```
bug描述:
小程序 真机 安卓测试没问题。苹果的测试出现问题。标记点iconPath图标 不能自定义了。多个 只能多个都是一样的。
0 个回复