modified generate_map_widget.sh script