|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "code", |
| 5 | + "execution_count": null, |
| 6 | + "id": "2", |
| 7 | + "metadata": {}, |
| 8 | + "outputs": [], |
| 9 | + "source": [ |
| 10 | + "import geemap\n", |
| 11 | + "import leafmap.maplibregl as leafmap\n", |
| 12 | + "\n", |
| 13 | + "geemap.ee_initialize()\n", |
| 14 | + "\n", |
| 15 | + "m = leafmap.Map(\n", |
| 16 | + " projection=\"globe\", sidebar_visible=True, center=[-100, 40], zoom=2, height=\"800px\"\n", |
| 17 | + ")\n", |
| 18 | + "google_hybrid = \"https://mt1.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}\"\n", |
| 19 | + "m.add_tile_layer(google_hybrid, name=\"Google Hybrid\", attribution=\"Google\")\n", |
| 20 | + "layer_name = \"NWI Wetlands\"\n", |
| 21 | + "m.add_nwi_basemap(name=layer_name, opacity=0.5)\n", |
| 22 | + "m.add_similarity_search(\n", |
| 23 | + " before_id=layer_name,\n", |
| 24 | + " default_year=2024,\n", |
| 25 | + " default_color=\"#0000ff\",\n", |
| 26 | + " default_threshold=0.8,\n", |
| 27 | + ")\n", |
| 28 | + "m.add_draw_control(controls=[\"point\", \"trash\"])\n", |
| 29 | + "m" |
| 30 | + ] |
| 31 | + } |
| 32 | + ], |
| 33 | + "metadata": { |
| 34 | + "kernelspec": { |
| 35 | + "display_name": "geo", |
| 36 | + "language": "python", |
| 37 | + "name": "python3" |
| 38 | + }, |
| 39 | + "language_info": { |
| 40 | + "codemirror_mode": { |
| 41 | + "name": "ipython", |
| 42 | + "version": 3 |
| 43 | + }, |
| 44 | + "file_extension": ".py", |
| 45 | + "mimetype": "text/x-python", |
| 46 | + "name": "python", |
| 47 | + "nbconvert_exporter": "python", |
| 48 | + "pygments_lexer": "ipython3", |
| 49 | + "version": "3.12.2" |
| 50 | + } |
| 51 | + }, |
| 52 | + "nbformat": 4, |
| 53 | + "nbformat_minor": 5 |
| 54 | +} |
0 commit comments