I am trying to loop over a list of dates that I am pulling from a column in a feature collection which causes errors. If I define the exact same dates in a list by hand, the function seems to work.
Can anyone provide insight into why one works and why another does not?
The EE link is here, https://code.earthengine.google.com/e58b4bb03fc1060e1f359a8a28a402d6.
and the code is here,
var pts = "users/spotter/combustion_scaling/original/modis/with_date"
//get a vector of all the unique dates in pts
var all_dates = pts.distinct(["Date"]).aggregate_array("Date");
print(all_dates.type);
//----------this part does not work
var feat_iteration = ee.FeatureCollection(all_dates.map(function(date){
print(date);
return(date)
}));
//----this part works
// var manual_dates = ['2001-07-01', '2006-01-01']
// var feat_iteration = manual_dates.map(function(date){
// print(date);
// });