{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/home/filipe/.virtualenvs/iris/lib/python2.7/site-packages/folium/__init__.py\n", "0.2.0\n" ] } ], "source": [ "import folium\n", "\n", "print(folium.__file__)\n", "print(folium.__version__)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lon = -(41 + 20/60. + 17/60/60.)\n", "lat = -(20 + 59/60. + 35/60/60.)\n", "\n", "min_lon, max_lon = -45, -35\n", "min_lat, max_lat = -25, -15\n", "\n", "mapa = folium.Map(location=[lat, lon], zoom_start=6,\n", " min_lat=min_lat, max_lat=max_lat,\n", " min_lon=min_lon, max_lon=max_lon)\n", "\n", "\n", "kw = dict(radius=5e4, fill_color='green', fill_opacity=1)\n", "\n", "popup = '{}'.format('Upper Left Corner')\n", "c0 = folium.CircleMarker(location=[max_lat, min_lon], popup=popup, **kw)\n", "\n", "\n", "popup = '{}'.format('Lower Left Corner')\n", "c1 = folium.CircleMarker(location=[min_lat, min_lon], popup=popup, **kw)\n", "\n", "popup = '{}'.format('Lower Right Corner')\n", "c2 = folium.CircleMarker(location=[min_lat, max_lon], popup=popup, **kw)\n", "\n", "popup = '{}'.format('Upper Right Corner')\n", "c3 = folium.CircleMarker(location=[max_lat, max_lon], popup=popup, **kw)\n", "\n", "for c in [c0, c1, c2, c3]:\n", " mapa.add_children(c)\n", "\n", "mapa" ] } ], "metadata": { "kernelspec": { "display_name": "Iris (Python 2)", "language": "python", "name": "iris_python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.8" } }, "nbformat": 4, "nbformat_minor": 0 }