The local variable ```can_draw_map``` is hiding the outer scope function ```can_draw_map``` defined on line +772.

Consider renaming the variable ```can_draw_map``` to ```can_draw_map_flag``` or ```can_draw_map_status``` ?