-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
pluginThis issue/PR is about an existing or new pluginThis issue/PR is about an existing or new plugin
Description
i used all possible functions to add leaflet ruler plugin but it gives me errors like :
js: Uncaught ReferenceError: map is not defined
Add Leaflet-Ruler plugin
m.get_root().header.add_child(folium.CssLink("https://unpkg.com/[email protected]/dist/leaflet.css"))
m.get_root().header.add_child(folium.CssLink("https://cdn.rawgit.com/gokertanrisever/leaflet-ruler/master/src/leaflet-ruler.css"))
m.get_root().html.add_child(folium.JavascriptLink("https://unpkg.com/[email protected]/dist/leaflet.js"))
m.get_root().html.add_child(folium.JavascriptLink("https://cdn.rawgit.com/gokertanrisever/leaflet-ruler/master/src/leaflet-ruler.js"))
my_js = '''
L.control.ruler().addTo(map);
'''
m.get_root().script.add_child(folium.Element(my_js))
i got all links from here: https://github.com/gokertanrisever/leaflet-ruler
Metadata
Metadata
Assignees
Labels
pluginThis issue/PR is about an existing or new pluginThis issue/PR is about an existing or new plugin