帖子
帖子
用户
博客
课程
显示全部楼层
3
帖子
0
勋章
18
Y币

[BUG] addBillboard BUG

[复制链接]
发表于 2018-9-7 17:45:29
本帖最后由 @搬砖一号@ 于 2018-9-7 17:48 编辑

添加一个广告移除之后在更换图片添加会将之前的所有图片一起添加进去,导致一个经纬度多个图标重叠在一起(ios异常           安卓正常)

var map = api.require('bMap');
map.addBillboard({
    id: 4,
    coords: {
        lon: 116.233,
        lat: 39.134
    },
    bgImg: 'widget://image/mapIcon1.png',
    content: {
        title: '大标题大标题大标题大标题',
        subTitle: '概述内容概述内容概述内容',
        illus: 'http://ico**.**/ajax/iconpng/?id=145044.png'
    },
    styles: {
        titleColor: '#000',
        titleSize: 16,
        subTitleColor: '#999',
        subTitleSize: 12,
        illusAlign: 'left'
    }
}, function(ret) {
    if (ret) {
        alert(JSON.stringify(ret));
    }
});

map.removeAnnotations({    ids: [4]});

map.addBillboard({
    id: 4,
    coords: {
        lon: 116.233,
        lat: 39.134
    },
    bgImg: 'widget://image/mapIcon2.png',
    content: {
        title: '大标题大标题大标题大标题',
        subTitle: '概述内容概述内容概述内容',
        illus: 'http://ico**.**/ajax/iconpng/?id=145044.png'
    },
    styles: {
        titleColor: '#000',
        titleSize: 16,
        subTitleColor: '#999',
        subTitleSize: 12,
        illusAlign: 'left'
    }
}, function(ret) {
    if (ret) {
        alert(JSON.stringify(ret));
    }
});

map.removeAnnotations({    ids: [4]});

map.addBillboard({
    id: 4,
    coords: {
        lon: 116.233,
        lat: 39.134
    },
    bgImg: 'widget://image/mapIcon3.png',
    content: {
        title: '大标题大标题大标题大标题',
        subTitle: '概述内容概述内容概述内容',
        illus: 'http://ico**.**/ajax/iconpng/?id=145044.png'
    },
    styles: {
        titleColor: '#000',
        titleSize: 16,
        subTitleColor: '#999',
        subTitleSize: 12,
        illusAlign: 'left'
    }
}, function(ret) {
    if (ret) {
        alert(JSON.stringify(ret));
    }
});


175
帖子
1
勋章
5678
Y币
解决了吗
3
帖子
0
勋章
18
Y币

没有 ios只能id但地图上要点击切换的点太多了
3
帖子
0
勋章
18
Y币
目前此问题用1.0.6版本可以解决
您需要登录后才可以回帖 登录

本版积分规则