CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-leafmap

A Python package for geospatial analysis and interactive mapping in a Jupyter environment.

54%

Overall

Evaluation54%

0.81x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-8/

Basemap Tile Composer

Create a small utility that assembles an interactive map using a catalog basemap plus user-supplied XYZ and WMS overlays, and exposes enough metadata for validation.

Capabilities

Catalog basemap selection

  • Given a basemap keyword, it loads the matching entry from the built-in basemap catalog; if no match exists, it falls back to a default, globally available basemap while still returning the attempted keyword. @test

XYZ overlay

  • It adds an XYZ tile overlay using a provided URL template and human-readable name, optionally including attribution metadata, and ensures the overlay sits above the basemap. @test

WMS overlay with extent

  • It adds a transparent WMS overlay from a service URL and layer name, honoring a provided bounding box and image format so that only the requested extent is rendered over the basemap. @test

Layer summary

  • It returns an ordered summary of all layers (basemap first, then overlays) with their names and types so callers can verify the stack without inspecting map internals. @test

Implementation

@generates

API

from typing import Any, Dict, List, Tuple

Bounds = Tuple[float, float, float, float]

def build_tile_map(
    basemap_keyword: str,
    xyz_url: str,
    xyz_name: str,
    wms_url: str,
    wms_layer: str,
    bounds: Bounds,
    *,
    xyz_attribution: str | None = None,
    wms_format: str = "image/png",
    wms_transparent: bool = True,
) -> tuple[Any, List[Dict[str, str]]]:
    """
    Creates an interactive map configured with a catalog basemap plus XYZ and WMS overlays.

    Expects bounds ordered as (min_lon, min_lat, max_lon, max_lat). Returns the map object
    (leafmap map instance) and an ordered list describing each layer (e.g., {"name": "...",
    "type": "basemap"|"xyz"|"wms"}).
    """

Dependencies { .dependencies }

leafmap { .dependency }

Provides basemap catalog search and XYZ/WMS tile layering utilities.

tessl i tessl/pypi-leafmap@0.52.0

tile.json