收藏
回答

地图组件导入运行后说渲染层出错


回答关注问题邀请回答
收藏

2 个回答

  • 罗天地狱
    罗天地狱
    2019-07-30

    <map id="map" longitude="113.324520" latitude="23.099994" scale="14" controls="{{controls}}" bindcontroltap="controltap" markers="{{markers}}" bindmarkertap="markertap" polyline="{{polyline}}" bindregionchange="regionchange" show-location style="width: 100%; height: 300px;"></map>

    Page({

    data: {

    markers: [{

    //iconPath: "/resources/others.png",

    id: 0,

    latitude: 23.099994,

    longitude: 113.324520,

    width: 50,

    height: 50

    }],

    polyline: [{

    points: [{

    longitude: 113.3245211,

    latitude: 23.10229

    }, {

    longitude: 113.324520,

    latitude: 23.21229

    }],

    color: "#FF0000DD",

    width: 2,

    dottedLine: true

    }],

    controls: [{

    id: 1,

    //iconPath: '/resources/location.png',

    position: {

    left: 0,

    top: 300 - 50,

    width: 50,

    height: 50

    },

    clickable: true

    }]

    },

    regionchange(e) {

    console.log(e.type)

    },

    markertap(e) {

    console.log(e.markerId)

    },

    controltap(e) {

    console.log(e.controlId)

    }

    })



    2019-07-30
    有用
    回复
  • 是小白啊
    是小白啊
    2019-07-30

    仅引入组件就报错?

    2019-07-30
    有用
    回复 6
    查看更多(1)
登录 后发表内容