提示 [渲染层错误] 实际第0元素的paths属性无效! 如何解决?
发布于 5 年前 作者 tangna 6916 次浏览 来自 官方Issues

请教下:

我远程获取的polygon数组数据为:

{“q”:1,“quyu”:{“num”:1,“latitude”:"",“longitude”:"",“detail”:[{“points”:[{“longitude”:“114.343762”,“latitude”:“30.627291”,“iconPath”:"/image/t.png"},{“longitude”:“114.352724”,“latitude”:“30.621428”,“iconPath”:"/image/t.png"},{“longitude”:“114.354015”,“latitude”:“30.620495”,“iconPath”:"/image/t.png"},{“longitude”:“114.356798”,“latitude”:“30.618246”,“iconPath”:"/image/t.png"},{“longitude”:“114.358169”,“latitude”:“30.616849”,“iconPath”:"/image/t.png"},{“longitude”:“114.359453”,“latitude”:“30.615395”,“iconPath”:"/image/t.png"},{“longitude”:“114.360087”,“latitude”:“30.614641”,“iconPath”:"/image/t.png"},{“longitude”:“114.360398”,“latitude”:“30.614254”,“iconPath”:"/image/t.png"},{“longitude”:“114.362214”,“latitude”:“30.611208”,“iconPath”:"/image/t.png"},{“longitude”:“114.363289”,“latitude”:“30.607686”,“iconPath”:"/image/t.png"},{“longitude”:“114.320397”,“latitude”:“30.596999”,“iconPath”:"/image/t.png"},{“longitude”:“114.32164”,“latitude”:“30.598607”,“iconPath”:"/image/t.png"},{“longitude”:“114.32333”,“latitude”:“30.600793”,“iconPath”:"/image/t.png"},{“longitude”:“114.325175”,“latitude”:“30.603178”,“iconPath”:"/image/t.png"},{“longitude”:“114.327687”,“latitude”:“30.606425”,“iconPath”:"/image/t.png"},{“longitude”:“114.338095”,“latitude”:“30.619879”,“iconPath”:"/image/t.png"},{“longitude”:“114.340878”,“latitude”:“30.623476”,“iconPath”:"/image/t.png"},{“longitude”:“114.343762”,“latitude”:“30.627291”,“iconPath”:"/image/t.png"}],“fillColor”:"#FF0000AA",“strokeWidth”:3,“strokeColor”:"#000000AA"}]}}

然后我输出数据绘制多边形:

that.setData({‘polygons’: res.data.quyu.__detail __});

但是没有正确绘制出图形,控制台报错如下:

请教各位朋友指点下这是哪里的问题,百思不得解。。。感谢。

回到顶部