Skip to content

Commit

Permalink
Merge branch 'master' of github.com:randyzwitch/streamlit-folium
Browse files Browse the repository at this point in the history
  • Loading branch information
randyzwitch committed Feb 9, 2022
2 parents de9a156 + 3eb5beb commit 2a9e7fa
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[["noscript", []], ["div", [["id", "root"]]], ["div", [["class", []]]], ["div", [["class", ["withScreencast"]]]], ["div", [["tabindex", "-1"]]], ["div", [["class", ["stApp", "css-fg4pbf", "eczokvf0"]]]], ["header", [["class", ["css-1moshnm", "e8zbici0"]], ["tabindex", "-1"]]], ["div", [["class", ["css-fk4es0", "e8zbici1"]], ["data-testid", "stDecoration"]]], ["div", [["class", ["css-r698ls", "e8zbici2"]], ["data-testid", "stToolbar"]]], ["span", [["aria-expanded", "false"], ["aria-haspopup", "true"], ["id", "MainMenu"]]], ["button", [["class", ["css-d1b1ld", "edgvbvh6"]], ["kind", "icon"]]], ["svg", [["aria-hidden", "true"], ["class", ["e1fb0mya0", "css-xq1lnh-EmotionIconBase", "ex0cdmw0"]], ["color", "inherit"], ["fill", "currentColor"], ["focusable", "false"], ["viewbox", "0 0 8 8"], ["xmlns", "http://www.w3.org/2000/svg"]]], ["path", [["d", "M0 1v1h8V1H0zm0 2.97v1h8v-1H0zm0 3v1h8v-1H0z"]]], ["div", [["class", ["reportview-container", "css-1wrcr25", "eknhn3m0"]], ["data-layout", "narrow"], ["data-testid", "stReportViewContainer"]]], ["section", [["class", ["main", "css-1v3fvcr", "eknhn3m1"]], ["tabindex", "0"]]], ["div", [["class", ["block-container", "css-12oz5g7", "eknhn3m2"]], ["style", "position: relative;"]]], ["div", [["style", "overflow: visible; width: 0px;"]]], ["div", [["class", ["element-container", "css-1e5imcs", "e1tzin5v1"]], ["data-stale", "false"], ["style", "width: 704px;"]]], ["div", [["class", ["stMarkdown"]], ["style", "width: 704px;"]]], ["div", [["class", ["css-177yq5e", "e16nr0p30"]], ["data-testid", "stMarkdownContainer"]]], ["h1", [["id", "streamlit-folium"]]], ["div", [["class", ["css-f341up", "e16nr0p31"]]]], ["a", [["class", ["css-d94sfw", "e16nr0p32"]], ["href", "#streamlit-folium"]]], ["svg", [["fill", "none"], ["height", "18"], ["stroke", "currentColor"], ["stroke-linecap", "round"], ["stroke-linejoin", "round"], ["stroke-width", "2"], ["viewbox", "0 0 24 24"], ["width", "18"], ["xmlns", "http://www.w3.org/2000/svg"]]], ["path", [["d", "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"]]], ["path", [["d", "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"]]], ["span", [["class", ["css-10trblm", "e16nr0p33"]]]], ["div", [["class", ["element-container", "css-1e5imcs", "e1tzin5v1"]], ["data-stale", "false"], ["style", "width: 704px;"]]], ["div", [["class", ["stMarkdown"]], ["style", "width: 704px;"]]], ["div", [["class", ["css-177yq5e", "e16nr0p30"]], ["data-testid", "stMarkdownContainer"]]], ["div", [["class", ["stCodeBlock", "css-jja0az", "e10mrw3y3"]]]], ["div", [["class", ["css-xjsf0x", "e10mrw3y2"]]]], ["button", [["class", ["css-aivdhp", "e10mrw3y1"]], ["data-clipboard-text", "import streamlit as st\nfrom streamlit_folium import folium_static\nimport folium\nimport branca\n\npage = st.radio(\n \"Select map type\", [\"Single map\", \"Dual map\", \"Branca figure\"], index=0\n)\n\n# center on Liberty Bell, add marker\nif page == \"Single map\":\n m = folium.Map(location=[39.949610, -75.150282], zoom_start=16)\n tooltip = \"Liberty Bell\"\n folium.Marker(\n [39.949610, -75.150282], popup=\"Liberty Bell\", tooltip=tooltip\n ).add_to(m)\n\nelif page == \"Dual map\":\n m = folium.plugins.DualMap(location=[39.949610, -75.150282], zoom_start=16)\n tooltip = \"Liberty Bell\"\n folium.Marker(\n [39.949610, -75.150282], popup=\"Liberty Bell\", tooltip=tooltip\n ).add_to(m)\n\nelif page == \"Branca figure\":\n m = branca.element.Figure()\n fm = folium.Map(location=[39.949610, -75.150282], zoom_start=16)\n tooltip = \"Liberty Bell\"\n folium.Marker(\n [39.949610, -75.150282], popup=\"Liberty Bell\", tooltip=tooltip\n ).add_to(fm)\n m.add_child(fm)\n\n# call to render Folium map in Streamlit\nfolium_static(m)"], ["style", "top: 0px; right: 0px;"], ["title", "Copy to clipboard"]]], ["svg", [["fill", "none"], ["height", "16"], ["stroke", "currentColor"], ["stroke-linecap", "round"], ["stroke-linejoin", "round"], ["stroke-width", "2"], ["viewbox", "0 0 24 24"], ["width", "16"], ["xmlns", "http://www.w3.org/2000/svg"]]], ["rect", [["height", "13"], ["rx", "2"], ["ry", "2"], ["width", "13"], ["x", "9"], ["y", "9"]]], ["path", [["d", "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"]]], ["pre", [["class", ["css-1qcggol", "e10mrw3y0"]]]], ["code", [["class", ["language-python"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "comment"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "keyword"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "number"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "string"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "operator"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "comment"]]]], ["span", [["class", ["token", "punctuation"]]]], ["span", [["class", ["token", "punctuation"]]]], ["div", [["class", ["element-container", "css-1e5imcs", "e1tzin5v1"]], ["data-stale", "false"], ["style", "width: 704px;"]]], ["div", [["class", ["row-widget", "stRadio"]], ["style", "width: 704px;"]]], ["label", [["class", ["css-qrbaxs", "effi0qh0"]]]], ["div", [["class", ["st-b4", "st-ba", "st-bb", "st-bc", "st-bd", "st-be"]], ["role", "radiogroup"]]], ["label", [["class", ["st-bf", "st-b4", "st-bg", "st-bd", "st-as", "st-at", "st-bh", "st-bi", "st-bj", "st-av", "st-aw", "st-ay", "st-ax"]], ["data-baseweb", "radio"]]], ["div", [["class", ["st-bg", "st-bk", "st-bl", "st-bm", "st-bn", "st-bo", "st-az", "st-b4", "st-bp", "st-bq", "st-br", "st-bs", "st-bt", "st-bu", "st-bv", "st-bw", "st-bx", "st-by", "st-b2", "st-bz"]]]], ["div", [["class", ["st-c0", "st-bl", "st-bm", "st-bn", "st-bo", "st-c1", "st-b2", "st-bz", "st-c2"]]]], ["input", [["checked", ""], ["class", ["st-b0", "st-an", "st-c3", "st-as", "st-c4", "st-at", "st-c5", "st-c6", "st-c7", "st-c8", "st-bh", "st-c9"]], ["name", ""], ["tabindex", "0"], ["type", "radio"], ["value", "0"]]], ["div", [["class", ["st-bw", "st-ca", "st-cb", "st-ae", "st-af", "st-ag", "st-ah", "st-ai", "st-aj"]]]], ["label", [["class", ["st-bf", "st-b4", "st-bg", "st-bd", "st-as", "st-at", "st-bh", "st-bi", "st-bj", "st-av", "st-aw", "st-ay", "st-ax"]], ["data-baseweb", "radio"]]], ["div", [["class", ["st-bg", "st-cc", "st-bl", "st-bm", "st-bn", "st-bo", "st-az", "st-b4", "st-bp", "st-bq", "st-br", "st-bs", "st-bt", "st-bu", "st-bv", "st-bw", "st-bx", "st-by", "st-b2", "st-bz"]]]], ["div", [["class", ["st-cd", "st-bl", "st-bm", "st-bn", "st-bo", "st-ce", "st-b2", "st-bz", "st-cf"]]]], ["input", [["class", ["st-b0", "st-an", "st-c3", "st-as", "st-c4", "st-at", "st-c5", "st-c6", "st-c7", "st-c8", "st-bh", "st-c9"]], ["name", ""], ["tabindex", "-1"], ["type", "radio"], ["value", "1"]]], ["div", [["class", ["st-bw", "st-ca", "st-cb", "st-ae", "st-af", "st-ag", "st-ah", "st-ai", "st-aj"]]]], ["label", [["class", ["st-bf", "st-b4", "st-bg", "st-bd", "st-as", "st-at", "st-bh", "st-bi", "st-bj", "st-av", "st-aw", "st-ay", "st-ax"]], ["data-baseweb", "radio"]]], ["div", [["class", ["st-bg", "st-cc", "st-bl", "st-bm", "st-bn", "st-bo", "st-az", "st-b4", "st-bp", "st-bq", "st-br", "st-bs", "st-bt", "st-bu", "st-bv", "st-bw", "st-bx", "st-by", "st-b2", "st-bz"]]]], ["div", [["class", ["st-cd", "st-bl", "st-bm", "st-bn", "st-bo", "st-ce", "st-b2", "st-bz", "st-cf"]]]], ["input", [["class", ["st-b0", "st-an", "st-c3", "st-as", "st-c4", "st-at", "st-c5", "st-c6", "st-c7", "st-c8", "st-bh", "st-c9"]], ["name", ""], ["tabindex", "-1"], ["type", "radio"], ["value", "2"]]], ["div", [["class", ["st-bw", "st-ca", "st-cb", "st-ae", "st-af", "st-ag", "st-ah", "st-ai", "st-aj"]]]], ["div", [["class", ["element-container", "css-1e5imcs", "e1tzin5v1"]], ["data-stale", "false"], ["style", "width: 704px;"]]], ["iframe", [["allow", "accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking"], ["height", "510"], ["sandbox", ["allow-forms", "allow-modals", "allow-popups", "allow-popups-to-escape-sandbox", "allow-same-origin", "allow-scripts", "allow-downloads"]], ["scrolling", "no"], ["srcdoc", "<!DOCTYPE html>\n<head> \n <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n \n <script>\n L_NO_TOUCH = false;\n L_DISABLE_3D = false;\n </script>\n \n <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n <script src=\"https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.js\"></script>\n <script src=\"https://code.jquery.com/jquery-1.12.4.min.js\"></script>\n <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js\"></script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js\"></script>\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css\"/>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css\"/>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css\"/>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css\"/>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css\"/>\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css\"/>\n \n <meta name=\"viewport\" content=\"width=device-width,\n initial-scale=1.0, maximum-scale=1.0, user-scalable=no\" />\n <style>\n #map_c03c6f03654d4b2b83c52ccb2fd153b2 {\n position: relative;\n width: 100.0%;\n height: 100.0%;\n left: 0.0%;\n top: 0.0%;\n }\n </style>\n \n</head>\n<body> \n \n <div class=\"folium-map\" id=\"map_c03c6f03654d4b2b83c52ccb2fd153b2\" ></div>\n \n</body>\n<script> \n \n var map_c03c6f03654d4b2b83c52ccb2fd153b2 = L.map(\n \"map_c03c6f03654d4b2b83c52ccb2fd153b2\",\n {\n center: [39.94961, -75.150282],\n crs: L.CRS.EPSG3857,\n zoom: 16,\n zoomControl: true,\n preferCanvas: false,\n }\n );\n\n \n\n \n \n var tile_layer_eceaa8293d704bc388f0e4ed325b6177 = L.tileLayer(\n \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\",\n {\"attribution\": \"Data by \\u0026copy; \\u003ca href=\\\"http://openstreetmap.org\\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca href=\\\"http://www.openstreetmap.org/copyright\\\"\\u003eODbL\\u003c/a\\u003e.\", \"detectRetina\": false, \"maxNativeZoom\": 18, \"maxZoom\": 18, \"minZoom\": 0, \"noWrap\": false, \"opacity\": 1, \"subdomains\": \"abc\", \"tms\": false}\n ).addTo(map_c03c6f03654d4b2b83c52ccb2fd153b2);\n \n \n var marker_5112efc908dc4af0a2850b922624f8a7 = L.marker(\n [39.94961, -75.150282],\n {}\n ).addTo(map_c03c6f03654d4b2b83c52ccb2fd153b2);\n \n \n var popup_47c527219dff43908fc84e65bb251c94 = L.popup({\"maxWidth\": \"100%\"});\n\n \n var html_6411d88f34ab429bacfcb0031e07c78f = $(`<div id=\"html_6411d88f34ab429bacfcb0031e07c78f\" style=\"width: 100.0%; height: 100.0%;\">Liberty Bell</div>`)[0];\n popup_47c527219dff43908fc84e65bb251c94.setContent(html_6411d88f34ab429bacfcb0031e07c78f);\n \n\n marker_5112efc908dc4af0a2850b922624f8a7.bindPopup(popup_47c527219dff43908fc84e65bb251c94)\n ;\n\n \n \n \n marker_5112efc908dc4af0a2850b922624f8a7.bindTooltip(\n `<div>\n Liberty Bell\n </div>`,\n {\"sticky\": true}\n );\n \n</script>"], ["style", "overflow: hidden;"], ["title", "st.iframe"], ["width", "700"]]], ["div", [["class", ["resize-triggers"]]]], ["div", [["class", ["expand-trigger"]]]], ["div", [["style", "width: 737px; height: 1843px;"]]], ["div", [["class", ["contract-trigger"]]]], ["footer", [["class", ["css-12gp8ed", "eknhn3m4"]]]], ["a", [["class", ["css-1vbd788", "eknhn3m3"]], ["href", "//streamlit.io"]]], ["div", [["class", []]]], ["script", []], ["script", [["src", "./static/js/5.c75abbe2.chunk.js"]]], ["script", [["src", "./static/js/main.455afa6b.chunk.js"]]]]

0 comments on commit 2a9e7fa

Please sign in to comment.