{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.3.0.dev\n" ] } ], "source": [ "import os\n", "import folium\n", "\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": [ "lat = +38.89399\n", "lon = -77.03659\n", "zoom_start = 17\n", "\n", "m = folium.Map(location=[lat, lon], zoom_start=zoom_start)\n", "\n", "kw = dict(fill_color='red', radius=20)\n", "c0 = folium.CircleMarker([38.89415, -77.03738], **kw)\n", "c1 = folium.CircleMarker([38.89415, -77.03578], **kw)\n", "\n", "\n", "locations = [[(38.893596444352134, -77.03814983367920), (38.893379333722040, -77.03792452812195)],\n", " [(38.893379333722040, -77.03792452812195), (38.893162222428310, -77.03761339187622)],\n", " [(38.893162222428310, -77.03761339187622), (38.893028615148424, -77.03731298446655)],\n", " [(38.893028615148424, -77.03731298446655), (38.892920059048464, -77.03691601753235)],\n", " [(38.892920059048464, -77.03691601753235), (38.892903358095296, -77.03637957572937)],\n", " [(38.892903358095296, -77.03637957572937), (38.893011914220770, -77.03592896461487)],\n", " [(38.893011914220770, -77.03592896461487), (38.893162222428310, -77.03549981117249)],\n", " [(38.893162222428310, -77.03549981117249), (38.893404384982480, -77.03514575958252)],\n", " [(38.893404384982480, -77.03514575958252), (38.893596444352134, -77.03496336936950)]]\n", "\n", "c3 = folium.PolyLine(locations=locations, color='orange', weight=8, opacity=1)\n", "\n", "for c in [c0, c1, c3]:\n", " m.add_child(c)\n", "\n", "m.save(os.path.join('results', 'MultiPolyline.html'))\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.5.2" } }, "nbformat": 4, "nbformat_minor": 1 }