{"id":29354385,"url":"https://github.com/opengeos/anymap","last_synced_at":"2026-03-10T00:31:35.304Z","repository":{"id":302358649,"uuid":"1012181087","full_name":"opengeos/anymap","owner":"opengeos","description":"A Python package for creating interactive maps with anywidget and JavaScript mapping libraries","archived":false,"fork":false,"pushed_at":"2026-02-28T20:02:15.000Z","size":21482,"stargazers_count":222,"open_issues_count":1,"forks_count":32,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-28T23:14:21.548Z","etag":null,"topics":["geospatial","jupyter","mapping","python"],"latest_commit_sha":null,"homepage":"http://anymap.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opengeos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-02T00:22:34.000Z","updated_at":"2026-02-28T20:01:01.000Z","dependencies_parsed_at":"2026-02-28T22:06:40.104Z","dependency_job_id":null,"html_url":"https://github.com/opengeos/anymap","commit_stats":null,"previous_names":["opengeos/anymap"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/opengeos/anymap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2Fanymap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2Fanymap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2Fanymap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2Fanymap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opengeos","download_url":"https://codeload.github.com/opengeos/anymap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2Fanymap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30318395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geospatial","jupyter","mapping","python"],"created_at":"2025-07-09T03:14:32.134Z","updated_at":"2026-03-10T00:31:35.275Z","avatar_url":"https://github.com/opengeos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AnyMap\n\n[![image](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/opengeos/anymap/HEAD)\n[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/opengeos/anymap/blob/main)\n[![image](https://img.shields.io/pypi/v/anymap.svg)](https://pypi.python.org/pypi/anymap)\n[![image](https://img.shields.io/conda/vn/conda-forge/anymap.svg)](https://anaconda.org/conda-forge/anymap)\n[![Conda Recipe](https://img.shields.io/badge/recipe-anymap-green.svg)](https://github.com/conda-forge/anymap-feedstock)\n[![image](https://static.pepy.tech/badge/anymap)](https://pepy.tech/project/anymap)\n[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/anymap.svg)](https://anaconda.org/conda-forge/anymap)\n[![image](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003c!-- [![Docker Image](https://img.shields.io/badge/docker-opengeos%2Fanymap-blue?logo=docker)](https://hub.docker.com/r/opengeos/anymap/tags)     --\u003e\n\n**A Python package for creating interactive maps with anywidget and JavaScript mapping libraries**\n\n-   GitHub repo: \u003chttps://github.com/opengeos/anymap\u003e\n-   Documentation: \u003chttps://anymap.dev\u003e\n-   PyPI: \u003chttps://pypi.org/project/anymap\u003e\n-   Conda-forge: \u003chttps://anaconda.org/conda-forge/anymap\u003e\n-   Free software: MIT License\n\n## Features\n\n-   🗺️ **Interactive Maps**: Create beautiful, interactive maps in Jupyter notebooks\n-   🔄 **Bidirectional Communication**: Full Python ↔ JavaScript communication\n-   📱 **Multi-cell Support**: Render maps in multiple notebook cells without conflicts\n-   🎯 **MapLibre Integration**: Built-in support for MapLibre GL JS\n-   🛠️ **Extensible**: Easy to add support for other mapping libraries\n-   🚀 **Familiar API**: Similar to ipyleaflet for easy migration\n\n## Installation\n\n```bash\npip install anymap\n```\n\n```bash\nconda install -c conda-forge anymap\n```\n\n## Quick Start\n\n```python\nfrom anymap import MapLibreMap\n\n# Create a basic map\nm = MapLibreMap(\n    center=[-122.4194, 37.7749],  # San Francisco\n    zoom=12,\n    height=\"600px\"\n)\nm\n```\n\n## Basic Usage\n\n### Creating Maps\n\n```python\nfrom anymap import MapLibreMap\n\n# Create a map with custom settings\nm = MapLibreMap(\n    center=[-74.0060, 40.7128],  # New York City\n    zoom=13,\n    height=\"500px\",\n    bearing=45,  # Map rotation\n    pitch=60     # 3D tilt\n)\n```\n\n### Adding Markers\n\n```python\n# Add a marker with popup and custom styling\nm.add_marker(\n    lat=40.7128,\n    lng=-74.0060,\n    popup=\"\u003ch3\u003eNew York City\u003c/h3\u003e\u003cp\u003eThe Big Apple\u003c/p\u003e\",\n    options={\n        \"color\": \"#ff5722\",\n        \"draggable\": True,\n    }\n)\n```\n\n### Working with GeoJSON\n\n```python\n# Add GeoJSON data\ngeojson_data = {\n    \"type\": \"FeatureCollection\",\n    \"features\": [\n        {\n            \"type\": \"Feature\",\n            \"geometry\": {\n                \"type\": \"Point\",\n                \"coordinates\": [-74.0060, 40.7128]\n            },\n            \"properties\": {\"name\": \"NYC\"}\n        }\n    ]\n}\n\nm.add_geojson_layer(\n    layer_id=\"cities\",\n    geojson_data=geojson_data,\n    layer_type=\"circle\",\n    paint={\n        \"circle-radius\": 8,\n        \"circle-color\": \"#ff0000\"\n    }\n)\n```\n\n### Event Handling\n\n```python\ndef handle_click(event):\n    lat, lng = event['lngLat']\n    print(f\"Clicked at: {lat:.4f}, {lng:.4f}\")\n\nm.on_map_event('click', handle_click)\n```\n\n### Dynamic Updates\n\n```python\n# Change map properties\nm.set_center(-0.1278, 51.5074)  # London\nm.set_zoom(14)\n\n# Animate to a location\nm.fly_to(2.3522, 48.8566, zoom=15)  # Paris\n```\n\n## Multi-Cell Rendering\n\nAnyMap is designed to work seamlessly across multiple notebook cells:\n\n```python\n# Cell 1\nm = MapLibreMap(center=[0, 0], zoom=2)\nm\n\n# Cell 2 - Same map instance\nm.add_marker(0, 0, popup=\"Origin\")\n\n# Cell 3 - Display again\nm\n```\n\n## Advanced Features\n\n### Layer Management\n\n```python\n# Add and remove layers\nm.add_source(\"my-source\", {\n    \"type\": \"geojson\",\n    \"data\": geojson_data\n})\n\nm.add_layer(\"my-layer\", {\n    \"id\": \"my-layer\",\n    \"type\": \"circle\",\n    \"source\": \"my-source\",\n    \"paint\": {\"circle-radius\": 5}\n})\n\n# Remove layers\nm.remove_layer(\"my-layer\")\nm.remove_source(\"my-source\")\n```\n\n### Custom JavaScript Methods\n\n```python\n# Call any MapLibre GL JS method\nm.call_js_method('easeTo', {\n    'center': [lng, lat],\n    'zoom': 14,\n    'duration': 2000\n})\n```\n\n## Examples\n\nCheck out the example notebooks in the `docs/examples` directory:\n\n-   `basic_usage.ipynb` - Basic map creation and interaction\n-   `advanced_features.ipynb` - Advanced layer management and styling\n-   `multi_cell_test.ipynb` - Multi-cell rendering tests\n\n## Development\n\nTo set up for development:\n\n```bash\ngit clone https://github.com/opengeos/anymap.git\ncd anymap\npip install -e .\n```\n\nRun tests:\n\n```bash\npython -m unittest tests.test_anymap -v\n```\n\n## Roadmap\n\n-   ✅ MapLibre GL JS backend\n-   ✅ Mapbox GL JS backend\n-   ✅ Leaflet backend\n-   ✅ OpenLayers backend\n-   ✅ DeckGL backend\n-   ✅ KeplerGL backend\n-   🔲 Cesium backend\n-   🔲 Potree backend\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeos%2Fanymap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengeos%2Fanymap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeos%2Fanymap/lists"}