jwass / mplleaflet

Easily convert matplotlib plots from Python into interactive Leaflet web maps.
BSD 3-Clause "New" or "Revised" License
522 stars 76 forks source link

How to use the plotting on mplleaflet Offline? Is it possible to use the map offline? #36

Closed Melzonko closed 8 years ago

Melzonko commented 8 years ago

How to use the plotting on mplleaflet Offline? Is it possible to use the map offline? @jwass

Thanks

Melzonko commented 8 years ago

By the way; I'm referring to "basic_plot.py: Simple line/point plotting" @jwass

ocefpaf commented 8 years ago

@Melzonko mplleaflet uses Leaflet to create maps. Leaflet maps require a tile server to produce the map. That mean, unless you have a local server, you cannot use them offline.

(You can take a static snapshot though.)

Melzonko commented 8 years ago

@ocefpaf Yes I have a local server in my company used for test purposes, and I need to download the slippy map on it "Snapshot will not help".. How can I do that if you please?

BR, Mohamed

ocefpaf commented 8 years ago

Shameless plug on if you use folium you can just pass your local server to the tiles option. Shameless plug off

In mplleaflet you can start here.

Melzonko commented 8 years ago

@ocefpaf Will try it.. Many Thanks

jwass commented 8 years ago

@Melzonko Also, check out the documentation for the tiles keyword argument: https://github.com/jwass/mplleaflet/blob/master/mplleaflet/_display.py#L37. You can pass a tuple of (URL, attribution string) to get tiles from your local server.

ocefpaf commented 8 years ago

You can pass a tuple of (URL, attribution string)

My bad! I should have notice that!

Melzonko commented 8 years ago

@ocefpaf @jwass Thanks guys .. You're really supportive.

BR

jwass commented 8 years ago

@ocefpaf No worries! Worth mentioning Folium either way :)