Skip to content

Commit b68ab3f

Browse files
Added real world example
1 parent d621d9a commit b68ab3f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

docs/user_guide/ui_elements/control.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,22 @@ from folium.features import Control
3636
m = folium.Map(location=[45, 0], zoom_start=4)
3737

3838
control = Control(
39-
"MyPlugin",
39+
"Fullscreen",
4040
position="topright",
4141
# Any plugin options become JS options.
42-
foo="bar",
42+
title="View Fullscreen",
43+
titleCancel="Exit Fullscreen",
4344
)
4445

4546
# Add the plugin's JS/CSS assets.
46-
control.add_js_link("my-plugin", "https://example.com/leaflet.my-plugin.min.js")
47-
control.add_css_link("my-plugin", "https://example.com/leaflet.my-plugin.css")
47+
control.add_js_link(
48+
"leaflet-fullscreen",
49+
"https://unpkg.com/leaflet.fullscreen@1.6.0/Control.FullScreen.js",
50+
)
51+
control.add_css_link(
52+
"leaflet-fullscreen",
53+
"https://unpkg.com/leaflet.fullscreen@1.6.0/Control.FullScreen.css",
54+
)
4855

4956
control.add_to(m)
5057
m

0 commit comments

Comments
 (0)