anymap-ts

A Python package for creating interactive maps with anywidget and TypeScript
Features
- Interactive maps in Jupyter notebooks
- Bidirectional Python-JavaScript communication via anywidget
- Drawing and geometry editing with maplibre-gl-geo-editor
- Layer control with maplibre-gl-layer-control
- Multiple basemap providers via xyzservices
- Export to standalone HTML
- TypeScript-based frontend for type safety and maintainability
Supported Libraries
| Library |
Description |
Use Case |
| MapLibre GL JS |
Open-source vector maps |
Default, general-purpose mapping |
| Mapbox GL JS |
Commercial vector maps |
Advanced styling, 3D terrain |
| Leaflet |
Lightweight, mobile-friendly |
Simple maps, broad compatibility |
| OpenLayers |
Feature-rich, enterprise |
WMS/WMTS, projections |
| DeckGL |
GPU-accelerated |
Large-scale data visualization |
| Cesium |
3D globe |
3D Tiles, terrain, global views |
| KeplerGL |
Data exploration |
Interactive data analysis |
| Potree |
Point clouds |
LiDAR visualization |
Installation
Quick Start
| from anymap_ts import Map
# Create a map centered on a location
m = Map(center=[-122.4, 37.8], zoom=10)
m.add_basemap("OpenStreetMap")
m.add_draw_control()
m
|