{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Change cursor type over the map" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from ipyleaflet import Map\n", "m = Map()\n", "m.zoom = 3\n", "m" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### There are two instances when you can change the cursor type: when dragging, and when not dragging" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Not dragging (default)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Crosshair\n", "m.default_style = {'cursor': 'crosshair'}" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Pointer\n", "m.default_style = {'cursor': 'default'}" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Waiting\n", "m.default_style = {'cursor': 'wait'}" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Not allowed value\n", "m.default_style = {'cursor': 'notallowedcursor'}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### When dragging" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# col resize\n", "m.dragging_style = {'cursor': 'col-resize'}" ] } ], "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 }