{ "cells": [ { "cell_type": "markdown", "id": "9c919fd0", "metadata": {}, "source": [ "# Geodesic lines on livemap: `flat` parameter.\n", "\n", "\n", "Parameter `flat` enables or disables geodesic lines on livemap.\n", "\n", "Layers that support `flat` parameter are `geom_segment()` and `geom_path()`:\n", "\n", "- `False` (by default) - allows projection to curve a line\n", "- `True` - keeps a line flat" ] }, { "cell_type": "code", "execution_count": 1, "id": "8074593b", "metadata": { "execution": { "iopub.execute_input": "2024-04-17T07:33:01.837282Z", "iopub.status.busy": "2024-04-17T07:33:01.837188Z", "iopub.status.idle": "2024-04-17T07:33:02.162050Z", "shell.execute_reply": "2024-04-17T07:33:02.161605Z" } }, "outputs": [], "source": [ "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "07854c6d", "metadata": { "execution": { "iopub.execute_input": "2024-04-17T07:33:02.163640Z", "iopub.status.busy": "2024-04-17T07:33:02.163511Z", "iopub.status.idle": "2024-04-17T07:33:02.165604Z", "shell.execute_reply": "2024-04-17T07:33:02.165433Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "3a86c13e", "metadata": { "execution": { "iopub.execute_input": "2024-04-17T07:33:02.166615Z", "iopub.status.busy": "2024-04-17T07:33:02.166541Z", "iopub.status.idle": "2024-04-17T07:33:02.167969Z", "shell.execute_reply": "2024-04-17T07:33:02.167792Z" }, "scrolled": true }, "outputs": [], "source": [ "data = {\n", " 'lon': [-73.7997, -149.9002],\n", " 'lat': [40.6408, 61.2180],\n", "}" ] }, { "cell_type": "markdown", "id": "22e1cb31", "metadata": {}, "source": [ "#### 1. Default Presentation\n", "\n", "By default a geodesic is drawn for `geom_path()` and `geom_segment()` on livemap. It is the shortest path between points on earth." ] }, { "cell_type": "code", "execution_count": 4, "id": "d3eacd9f", "metadata": { "execution": { "iopub.execute_input": "2024-04-17T07:33:02.169005Z", "iopub.status.busy": "2024-04-17T07:33:02.168932Z", "iopub.status.idle": "2024-04-17T07:33:02.200677Z", "shell.execute_reply": "2024-04-17T07:33:02.200444Z" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "