-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add zoom_control option to Map()
#899
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 zoom_control option to Map()
#899
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good to me. I don't mind having this in kwargs, though in general I think we should be careful not to bloat it.
Two requests before merging this:
- Add a line to the changelog
- The Travis tests failed, can you check it out and fix the test that was affected by your edit?
folium/folium.py
Outdated
@@ -197,7 +199,8 @@ class Map(MacroElement): | |||
maxBounds: bounds, | |||
layers: [], | |||
worldCopyJump: {{this.world_copy_jump.__str__().lower()}}, | |||
crs: L.CRS.{{this.crs}} | |||
crs: L.CRS.{{this.crs}}, | |||
zoomControl: {{this.zoom_control.__str__().lower()}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a trailing comma after the line you added
@Conengmo Thanks for the quick feedback. Travis is not failign a test per se but failing to import:
This bug report suggests to uninstall and reinstall Ideas? |
requirements-dev.txt
Outdated
@@ -10,6 +10,7 @@ flake8-quotes | |||
geographiclib | |||
geopandas | |||
gpxpy | |||
h5py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this will fix things. I'm looking into the issue on the coda-forge side. Hold on...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, folium does not depend on h5py
at all. The error is coming from fiona
b/c of it links to hdf5
. Please remove that line and wait a little bit as I fix the package upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will revert commit.
This reverts commit 2d1a4cf.
@ocefpaf Thanks for looking into this. Merged upstream master into current PR. |
Enhancement #795: add a
zoom_control
option to the map creation (default:True
)Use case: create a .gif from 30+ snapshots of the map. The zoom controls do not serve any purpose and clutter the view.
If averse to adding kwargs to the
Map()
constructor, I could create a set method for ex-post toggle of the zoom controls.