收藏
回答

Map的circle参数有bug?

问题模块
API和组件

Android和iOS的测试结果不一样。 

iOS的似乎单位就是「米」,Android的设置为50,显示的半径大概是150米。


因为我要用圆包住所有marker,距离值和坐标都是服务器返回的,都是一致的,不区分机型。

实测安卓上如果 /3,那就差不多是预计值。


感觉是bug,求confirm。



另外最新版本的开发者工具下,如果不填写「color」属性(可选)显示不出circle并且有「渲染错误」。

真机看了一下vConsole没有提示错误的。


VM124:1 Tue Jan 10 2017 15:15:39 GMT+0800 (CST) 渲染层错误

VM124:2 webviewScriptError

Cannot read property 'indexOf' of undefined;Exparser Property Observer Error @ wx-map#circlesChanged

TypeError: Cannot read property 'indexOf' of undefined

    at r._transformColor (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:24:6693)

    at http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:24:14945

    at Array.map (native)

    at r.circlesChanged (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:24:14766)

    at Function.n.safeCallback (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:21:18872)

    at r.set [as circles] (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:21:29025)

    at t.applyProperties (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:27:4512)

    at Function.value (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:27:9571)

    at e.value (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:27:9035)

    at http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:27:10860

(anonymous) @ VM124:2

VM125:1 Tue Jan 10 2017 15:15:39 GMT+0800 (CST) 渲染层错误

VM125:2 Exparser Property Observer Error @ wx-map#circlesChanged

(anonymous) @ VM125:2

VM126:1 Tue Jan 10 2017 15:15:39 GMT+0800 (CST) 渲染层错误

VM126:2 TypeError: Cannot read property 'indexOf' of undefined

    at r._transformColor (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:24:6693)

    at http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:24:14945

    at Array.map (native)

    at r.circlesChanged (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:24:14766)

    at Function.n.safeCallback (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:21:18872)

    at r.set [as circles] (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:21:29025)

    at t.applyProperties (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:27:4512)

    at Function.value (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:27:9571)

    at e.value (http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:27:9035)

    at http://1964187184.debug.open.weixin.qq.com/apps/liemo/pages/index/index.html:27:10860

(anonymous) @ VM126:2


测试机型:

  1. Android --- 红米Note3最新版本stable ROM

  2. iOS --- iPhone 5c/ iOS 10.2


var resultRange = [{

                    latitude: lat,

                    longitude: lng,

                    color: "#00000000",

                    fillColor: "#7fbafd3f",

                    radius: (farestDistance + 10)

                }];


最后一次编辑于  2017-01-10  (未经腾讯允许,不得转载)
回答关注问题邀请回答
收藏