{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Make this Notebook Trusted to load map: File -> Trust Notebook
" ], "text/plain": [ "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import folium\n", "\n", "\n", "lon = -(41 + 20 / 60.0 + 17 / 60 / 60.0)\n", "lat = -(20 + 59 / 60.0 + 35 / 60 / 60.0)\n", "\n", "min_lon, max_lon = -45, -35\n", "min_lat, max_lat = -25, -15\n", "\n", "m = folium.Map(\n", " max_bounds=True,\n", " location=[lat, lon],\n", " zoom_start=6,\n", " min_lat=min_lat,\n", " max_lat=max_lat,\n", " min_lon=min_lon,\n", " max_lon=max_lon,\n", ")\n", "\n", "\n", "kw = {\n", " \"radius\": 10,\n", " \"color\": \"black\",\n", " \"fill\": True,\n", " \"weight\": 1,\n", " \"fill_color\": \"green\",\n", " \"fill_opacity\": 1,\n", "}\n", "\n", "c0 = folium.CircleMarker(location=[max_lat, min_lon], tooltip=\"Upper Left Corner\", **kw)\n", "c1 = folium.CircleMarker(location=[min_lat, min_lon], tooltip=\"Lower Left Corner\", **kw)\n", "c2 = folium.CircleMarker(\n", " location=[min_lat, max_lon], tooltip=\"Lower Right Corner\", **kw\n", ")\n", "c3 = folium.CircleMarker(\n", " location=[max_lat, max_lon], tooltip=\"Upper Right Corner\", **kw\n", ")\n", "\n", "for c in [c0, c1, c2, c3]:\n", " m.add_child(c)\n", "\n", "m" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.0" } }, "nbformat": 4, "nbformat_minor": 1 }