com.google.maps.api.android.lib6.gmm6.l.l.a上的java.lang.StackOverflowError

 mMap.addPolyline(new PolylineOptions().addAll(drawCoordinates));

原因

 java.lang.StackOverflowError
                at com.google.maps.api.android.lib6.gmm6.l.l.a(Unknown Source)
                at com.google.maps.api.android.lib6.gmm6.l.l.a(Unknown Source)
                at com.google.maps.api.android.lib6.gmm6.l.l.a(Unknown Source)

with drawCoordinates.size> 〜8000

有任何想法吗?谢谢.

最佳答案 >绘制多条折线,每条折线都有一个坐标的子集. –

CommonsWare

>首先在设置坐标后创建一个空的折线(看起来像它

解决问题)

    折线p = mMap.addPolyline ..; pLines.get(ⅰ).setPoints(线);

>
http://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm

>
http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm

点赞