-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Clean-up Map #1127
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
Clean-up Map #1127
Conversation
`map` conflicts with a Python built-in function. Convention is to use `m` instead.
Remove the `Map.add_tile_layer()` method, instead the `TileLayer` class should be used directly. Remove a couple advanced `TileLayer` arguments from `Map`. If someone needs those they should use `TileLayer` directly.
I'm happy with the changes here but we will need to re-work the tests to get that to pass. |
Good to hear! I'm working on getting the tests working, but my environment got F-ed up so I need to fix that first :p |
I removed the |
I agree. That outlived its usefulness a long time ago. Thanks! |
Thanks for the review and the merge Filipe, I appreciate it. Reading back my last comment I must say I was a bit frustrated after an hour of trying to fix DLL problems with Anaconda on Windows :p I don’t want to be disrespectful of previous work. Instead it’s really cool to see what the work of multiple different people over multiple years has led to. |
Sorry about that. The only reason to use conda via minconda to install packages (not Anaconda b/c that is the full distribution and kind of heavy-weight for us) is to install geopandas (b/c of its dependency on The situation on Windows got better now that you can use |
This PR contains changes to simplify the
Map
class.I removed the
add_tile_layer()
method, it seems like a relic from when folium didn't work with classes yet. TheTileLayer
should be used directly instead.Map
currently contains a lot of arguments, some of which are duplicate withTileLayer
. I removed some of the more advanced ones, such asAPI_key
,max_native_zoom
,detect_retina
,subdomains
andnowrap
. Note that these are all still available in theTileLayer
class, so if someone needs them they can use theTileLayer
class directly.I also made the options parsing a bit simpler. Use the
parse_options
method to create a dictionary suitable for unpacking in the template. Don't define arrays in the template. Less code, less trouble.