# Path: gtfspy/mapviz.py
# MAP_STYLES = [
#     "rastertiles/voyager",
#     "rastertiles/voyager_nolabels",
#     "rastertiles/voyager_only_labels",
#     "rastertiles/voyager_labels_under",
#     "light_all",
#     "dark_all",
#     "light_nolabels",
#     "light_only_labels",
#     "dark_nolabels",
#     "dark_only_labels"
# ]
# def _get_median_centered_plot_bounds(g):
# def plot_route_network_from_gtfs(g, ax=None, spatial_bounds=None, map_alpha=0.8, scalebar=True, legend=True,
#                                  return_smopy_map=False, map_style=None):
# def plot_as_routes(route_shapes, ax=None, spatial_bounds=None, map_alpha=0.8, plot_scalebar=True, legend=True,
#                    return_smopy_map=False, line_width_attribute=None, line_width_scale=1.0, map_style=None):
# def plot_routes_as_stop_to_stop_network(from_lats, from_lons, to_lats, to_lons, attributes=None, color_attributes=None,
#                                         zorders=None,
#                                         line_labels=None,
#                                         ax=None,
#                                         spatial_bounds=None,
#                                         alpha=1,
#                                         map_alpha=0.8,
#                                         scalebar=True,
#                                         return_smopy_map=False,
#                                         c=None, linewidth=None,
#                                         linewidth_multiplier=1,
#                                         use_log_scale=False):
# def _add_scale_bar(ax, lat, lon_min, lon_max, width_pixels):
# def _expand_spatial_bounds_to_fit_axes(bounds, ax_width, ax_height):
# def plot_route_network_thumbnail(g, map_style=None):
# def plot_stops_with_categorical_attributes(lats_list, lons_list, attributes_list, s=0.5, spatial_bounds=None,  colorbar=False, ax=None, cmap=None, norm=None, alpha=None):
# def plot_stops_with_attributes(lats, lons, attribute, s=0.5, spatial_bounds=None, colorbar=False, ax=None, cmap=None, norm=None, alpha=None):
# def plot_all_stops(g, ax=None, scalebar=False):
# def get_smopy_map(lon_min, lon_max, lat_min, lat_max, z=None, map_style=None):


from gtfspy import mapviz
from example_import import load_or_import_example_gtfs
from matplotlib import pyplot as plt

g = load_or_import_example_gtfs()
# g is now a gtfspy.gtfs.GTFS object

# Plot the route network and all stops to the same axes
ax = mapviz.plot_route_network_from_gtfs(g, scalebar=True)
mapviz.plot_all_stops(g, ax)

# Plot also a thumbnail figure highlighting the central areas:
# ax_thumbnail = mapviz.plot_route_network_thumbnail(g)

# ax_thumbnail.figure.savefig("test_thumbnail.jpg")


# Path: gtfspy/mapviz.py
# MAP_STYLES = [
#     "rastertiles/voyager",
#     "rastertiles/voyager_nolabels",
#     "rastertiles/voyager_only_labels",
#     "rastertiles/voyager_labels_under",
#     "light_all",
#     "dark_all",
#     "light_nolabels",
#     "light_only_labels",
#     "dark_nolabels",
#     "dark_only_labels"
# ]
# def _get_median_centered_plot_bounds(g):
# def plot_route_network_from_gtfs(g, ax=None, spatial_bounds=None, map_alpha=0.8, scalebar=True, legend=True,
#                                  return_smopy_map=False, map_style=None):
# def plot_as_routes(route_shapes, ax=None, spatial_bounds=None, map_alpha=0.8, plot_scalebar=True, legend=True,
#                    return_smopy_map=False, line_width_attribute=None, line_width_scale=1.0, map_style=None):
# def plot_routes_as_stop_to_stop_network(from_lats, from_lons, to_lats, to_lons, attributes=None, color_attributes=None,
#                                         zorders=None,
#                                         line_labels=None,
#                                         ax=None,
#                                         spatial_bounds=None,
#                                         alpha=1,
#                                         map_alpha=0.8,
#                                         scalebar=True,
#                                         return_smopy_map=False,
#                                         c=None, linewidth=None,
#                                         linewidth_multiplier=1,
#                                         use_log_scale=False):
# def _add_scale_bar(ax, lat, lon_min, lon_max, width_pixels):
# def _expand_spatial_bounds_to_fit_axes(bounds, ax_width, ax_height):
# def plot_route_network_thumbnail(g, map_style=None):
# def plot_stops_with_categorical_attributes(lats_list, lons_list, attributes_list, s=0.5, spatial_bounds=None,  colorbar=False, ax=None, cmap=None, norm=None, alpha=None):
# def plot_stops_with_attributes(lats, lons, attribute, s=0.5, spatial_bounds=None, colorbar=False, ax=None, cmap=None, norm=None, alpha=None):
# def plot_all_stops(g, ax=None, scalebar=False):
# def get_smopy_map(lon_min, lon_max, lat_min, lat_max, z=None, map_style=None):


# Path: examples/example_map_visualization.py
from gtfspy import mapviz
from example_import import load_or_import_example_gtfs
from matplotlib import pyplot as plt


g = load_or_import_example_gtfs()
# g is now a gtfspy.gtfs.GTFS object

# Plot the route network and all stops to the same axes
ax = mapviz.plot_route_network_from_gtfs(g, scalebar=True)
mapviz.plot_all_stops(g, ax)

# Plot also a thumbnail figure highlighting the central areas:
# ax_thumbnail = mapviz.plot_route_network_thumbnail(g)

# ax_thumbnail.figure.savefig("test_thumbnail.jpg")


plt.show()