添加一些线和标记后,Nutiteq地图冻结 [英] Nutiteq map freezing after adding a few lines and markers

查看:117
本文介绍了添加一些线和标记后,Nutiteq地图冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个交通应用程序,并且道路上有一些交通线路和警告标记.我根据缩放级别绘制交通线.例如,如果缩放级别超过10,则即时删除所有行并重新绘制以获取新的缩放级别.因为线路在路上溢出. 每个缩放级别的行数都超过400.因此,每次放大/缩小动作,我都会删除并重新绘制.一段时间后,我的地图开始冻结并且移动非常缓慢.

im developing a traffic application and there is a few traffic lines and warning markers on the road. I draw traffic lines according to zoom level. For example, If zoom level is over 10, im removing all lines and redraw for new zoom level. Because lines overflow on the road. I have lines over 400 for every zoom level. So every zoom in/ zoom out action, i remove and redraw. After a while my map begins to freeze and moving very slowly.

后台是否有任何缓存操作?因为即时通讯会清除每个缩放级别的地图.除了应该避免冻结之外,还应该做些什么?

Is there any caching operation on background? Because im clearing the map every zoom level. In addition to what I should do to avoid freezing?

public GeometryLayer geoLayer;
geoLayer = new GeometryLayer(new EPSG4326());

line = new Line(arr_lat_long1, label, lineStyle, null); //add lines
                line.setVertexList(arr_lat_long1);
                geoLayer.add(line);
geoLayer.clear(); //clear layer

我尝试了mapview.destroyDrawingCache(); ,mapview.postInvalidate();但他们对我没有帮助.另外,有什么方法可以刷新mapview吗?

I tried mapview.destroyDrawingCache(); , mapview.postInvalidate(); but they doesn't help me. In addition, is there any way to refresh mapview?

推荐答案

几乎不可能在不知道更多细节的情况下提出任何建议.最好的想法是在 https://github.com/nutiteq/hellomap3d/issues并附上显示您的问题的有效测试用例.如果可复制,将进行调查.

It is pretty much impossible to suggest anything without knowing more details. The best idea is to create a issue at https://github.com/nutiteq/hellomap3d/issues and attach a working test case displaying your issue. If it is reproducible, it will be investigated.

这篇关于添加一些线和标记后,Nutiteq地图冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆