{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import os\n", "\n", "from ipyleaflet import Map, SearchControl, Marker, AwesomeIcon\n", "center = [19.1646, 72.8493]\n", "m = Map(center=center, zoom=3)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "marker = Marker(icon=AwesomeIcon(name=\"check\", marker_color='green', icon_color='darkgreen'))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "search = SearchControl(position=\"topleft\", \n", " url='https://nominatim.openstreetmap.org/search?format=json&q={s}', \n", " zoom=5,\n", " property_name='display_name',\n", " marker=marker\n", " )\n", "m.add_control(search)\n", "m" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "marker.icon = AwesomeIcon(name=\"check\", marker_color='red', icon_color='darkred')" ] } ], "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.8.2" } }, "nbformat": 4, "nbformat_minor": 4 }