Nutiteq map freezing after adding a few lines and markers

霸气de小男生 提交于 2019-12-11 16:16:27

问题


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

EDIT:

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


回答1:


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.



来源:https://stackoverflow.com/questions/27354516/nutiteq-map-freezing-after-adding-a-few-lines-and-markers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!