{ "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": [ "m = folium.Map(location=[44, -73], zoom_start=5)\n", "\n", "marker_cluster = folium.MarkerCluster().add_to(m)\n", "\n", "\n", "folium.Marker(\n", " location=[40.67, -73.94],\n", " popup='Add popup text here.',\n", " icon=folium.Icon(color='green', icon='ok-sign'),\n", ").add_to(marker_cluster)\n", "\n", "folium.Marker(\n", " location=[44.67, -73.94],\n", " popup='Add popup text here.',\n", " icon=folium.Icon(color='red', icon='remove-sign'),\n", ").add_to(marker_cluster)\n", "\n", "folium.Marker(\n", " location=[44.67, -71.94],\n", " popup='Add popup text here.',\n", " icon=None,\n", ").add_to(marker_cluster)\n", "\n", "m.save(os.path.join('results', 'MarkerCluster_simple.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": 0 }