{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import folium\n", "import numpy as np\n", "\n", "image = np.zeros((61, 61))\n", "image[0, :] = 1.0\n", "image[60, :] = 1.0\n", "image[:, 0] = 1.0\n", "image[:, 60] = 1.0" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m = folium.Map([37, 0], zoom_start=2)\n", "\n", "folium.raster_layers.ImageOverlay(\n", " image=image,\n", " bounds=[[0, -60], [60, 60]],\n", " colormap=lambda x: (0, 1, 0, x),\n", ").add_to(m)\n", "\n", "folium.Marker(\n", " [-60, -30]\n", " , popup = 'Northing(?)'\n", " , tooltip = 'Northing(?)'\n", ").add_to(m)\n", "\n", "folium.Marker(\n", " [10, -180]\n", " , popup = 'Easthing(?)'\n", " , tooltip = 'Easthing'\n", ").add_to(m)\n", "\n", "folium.Marker(\n", " [0, -60]\n", " , popup = 'Northing(?)'\n", " , tooltip = 'Northing(?)'\n", ").add_to(m)\n", "\n", "folium.Marker(\n", " [60, 60]\n", " , popup = 'Easthing(?)'\n", " , tooltip = 'Easthing(?)'\n", ").add_to(m)\n", "\n", "\n", "m" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "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": 2 }