I don’t think that the code will work correctly, firstly, because in the getAllPositions function you return something called "position" that is not visible from there, and even if you return the "position", which is an array of position, it seems empty ...
LatLng
public List<LatLng> getAllPositions() {
List<LatLng> positionList = new ArrayList<LatLng>();
Cursor cursor = database.query(MySQLiteHelper.TABLE_NAME,
allColumns, null, null, null, null, null);
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
String positions = cursor.getString(1);
double latitude = cursor.getColumnIndex("lat");
double longitude = cursor.getColumnIndex("long");
LatLng newLatLng = new LatLng(latitude, longitude);
positionList.add(newLatLng);
cursor.moveToNext();
}
cursor.close();
return positionList;
}
:
List<LatLng> positionToDraw = getAllPositions();
for(int i=0;i<positiontoDraw.size();i++){
CircleOptions circleOptions = new CircleOptions().center(positionToDraw.get(i));
}
, .