mplleaflet
mplleaflet copied to clipboard
Popup text for exported features
Hi!
Is there any way to annotate matplotlib points/line segments in such a way that they become marker popups in leaflet? To clarify, I'd like reproduce the following effect:
import os
import folium
mapit = folium.Map()
PER = (-31.940, 115.967)
MEL = (-37.673, 144.843)
folium.CircleMarker(location=MEL, color='#ff0000',
fill_color='#ff0000', popup='Melbourne airport',
radius=4).add_to(mapit)
folium.CircleMarker(location=PER, color='#ff0000',
fill_color='#ff0000', popup='Perth airport',
radius=4).add_to(mapit)
folium.PolyLine([PER, MEL], color='#ffff00', popup='MEL-PER').add_to(mapit)
mapit.save(os.path.expanduser('~/Desktop/perth.html'))
Maybe this is impossible but I thought I'd ask. =) Thanks!