1

I'm working on android polyline with latitude and longitude but the points join me as already try others How to dynamically add polylines from an arraylist

so he paints

            pointss =  getCoordenadas();
            for (int x = 0; x < pointss.size(); x++){
                polylineOptions.add(pointss.get(x));
            }
            mMap.addPolyline(polylineOptions);

 

public List<LatLng> getAllPositions(String co, String lo) {
    List<LatLng> positionList = new ArrayList<LatLng>();

    FallasHelper falHelper = new FallasHelper(getActivity());
    cursor = falHelper.Select(co,lo);
    cursor.moveToFirst();
    while (!cursor.isAfterLast()) {
        double latitude = cursor.getDouble(0);
        double longitude = cursor.getDouble(1);

        LatLng newLatLng = new LatLng(latitude, longitude);
        positionList.add(newLatLng);
        cursor.moveToNext();
    }
    cursor.close();
    return positionList;
}
Bö macht Blau
  • 12,820
  • 5
  • 40
  • 61

0 Answers0