diff --git a/.gitignore b/.gitignore
index 98960f924..64f67788a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,5 @@ miniconda.sh
latest_logs/
*.nbconvert.ipynb
folium/_version.py
+.vscode/
+venv/
diff --git a/examples/Quickstart.ipynb b/examples/Quickstart.ipynb
index 473e09bd9..6bfec5c40 100644
--- a/examples/Quickstart.ipynb
+++ b/examples/Quickstart.ipynb
@@ -42,10 +42,77 @@
{
"data": {
"text/html": [
- "
Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 2,
@@ -88,10 +155,77 @@
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 4,
@@ -144,10 +278,135 @@
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 5,
@@ -185,10 +444,158 @@
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 6,
@@ -236,10 +643,119 @@
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 7,
@@ -286,10 +802,88 @@
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 8,
@@ -315,15 +909,116 @@
{
"cell_type": "code",
"execution_count": 9,
- "metadata": {},
+ "metadata": {
+ "scrolled": true
+ },
"outputs": [
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
"execution_count": 9,
@@ -342,6 +1037,132 @@
"m"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Polylines\n",
+ "\n",
+ "`folium` can show linear elements on a map using `PolyLine`. This object can help put emphasis on a trail, a road, or a coastline."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "m = folium.Map(location=[-71.38, -73.9], zoom_start=11)\n",
+ "\n",
+ "trail_coordinates = [\n",
+ " (-71.351871840295871, -73.655963711222626),\n",
+ " (-71.374144382613707, -73.719861619751498),\n",
+ " (-71.391042575973145, -73.784922248007007),\n",
+ " (-71.400964450973134, -73.851042243124397),\n",
+ " (-71.402411391077322, -74.050048183880477),\n",
+ "]\n",
+ "\n",
+ "\n",
+ "folium.PolyLine(trail_coordinates, tooltip=\"Coast\").add_to(m)\n",
+ "\n",
+ "m"
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
@@ -355,7 +1176,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
@@ -373,19 +1194,192 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 11,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@@ -436,7 +1430,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 13,
"metadata": {
"scrolled": false
},
@@ -444,13 +1438,130 @@
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 12,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -494,19 +1605,193 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 13,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -550,19 +1835,174 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 14,
+ "execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
@@ -607,19 +2047,101 @@
},
{
"cell_type": "code",
- "execution_count": 15,
+ "execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 15,
+ "execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -663,19 +2185,101 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 16,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -709,19 +2313,101 @@
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
- "Make this Notebook Trusted to load map: File -> Trust Notebook
"
+ "Make this Notebook Trusted to load map: File -> Trust Notebook
"
],
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 17,
+ "execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@@ -779,7 +2465,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.6"
+ "version": "3.9.13"
},
"toc": {
"base_numbering": 1,