Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional folium_map parameter to plot_routes_folium. #224

Merged
merged 3 commits into from
May 21, 2024

Conversation

vbmendes
Copy link
Contributor

@vbmendes vbmendes commented May 20, 2024

Closes #199.

This PR adds the folium_map parameter to the plot_routes_folium function.

For this, I refactored the plot_route_folium and broke it into 3 helper functions:

  1. result_dict_to_coords to convert a result from CompassApp into a sequence of coordinates in the format (lat, lng).
  2. _create_empty_folium_map
  3. plot_coords_folium to plot the coordinates in a folium Map.

This way, I can reuse these three pieces of code in the plot_routes_folium function.

Copy link
Collaborator

@nreinicke nreinicke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks for adding this in!

@nreinicke nreinicke merged commit ce657de into NREL:main May 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass optional folium map to plot
2 participants