{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/gee-community/geemap/blob/master/examples/notebooks/128_add_widget.ipynb)\n", "[![image](https://mybinder.org/badge_logo.svg)](https://gishub.org/geemap-binder)\n", "\n", "Uncomment the following line to install [geemap](https://geemap.org) if needed." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# !pip install -U geemap" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import geemap" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Add text." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m = geemap.Map()\n", "text = 'Hello World'\n", "m.add_text(text, position='bottomright')\n", "m" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Customize text style." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m = geemap.Map()\n", "text = 'Hello World'\n", "\n", "params = {\n", " 'fontsize': 30,\n", " 'fontcolor': 'blue',\n", " 'bold': True,\n", " 'padding': '10px',\n", " 'background': True,\n", " 'bg_color': 'white',\n", " 'border_radius': '5px',\n", " 'position': 'bottomright',\n", "}\n", "\n", "m.add_text(text, **params)\n", "m" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Add image." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m = geemap.Map()\n", "image = 'https://i.imgur.com/LmTETPX.png'\n", "m.add_image(image, position='bottomright')\n", "m" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Add HTML." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m = geemap.Map()\n", "html = \"\"\"\n", "