Skip to content

Add support maplibre-three-plugin#98

Merged
giswqs merged 4 commits intomainfrom
claude/add-maplibre-three-plugin-011CUSsagMtynNWph4odWWmJ
Oct 25, 2025
Merged

Add support maplibre-three-plugin#98
giswqs merged 4 commits intomainfrom
claude/add-maplibre-three-plugin-011CUSsagMtynNWph4odWWmJ

Conversation

@giswqs
Copy link
Copy Markdown
Member

@giswqs giswqs commented Oct 25, 2025

image

claude and others added 2 commits October 24, 2025 23:20
This commit adds comprehensive support for the maplibre-three-plugin, enabling 3D model rendering on MapLibre maps using Three.js.

Changes:
- Added Three.js and GLTFLoader loading in maplibre_widget.js
- Added maplibre-three-plugin library loading from jsDelivr CDN
- Implemented JavaScript handlers for:
  - initMapScene: Initialize the MapScene for Three.js integration
  - addThreeModel: Load and display GLTF 3D models on the map
  - addThreeLight: Add lighting (ambient, directional, sun) to the scene
  - removeThreeModel: Remove 3D models from the scene
  - updateThreeModel: Update model properties (scale, rotation, position)

- Added Python methods to MapLibreMap class:
  - init_three_scene(): Initialize the Three.js scene
  - add_three_model(): Add GLTF models with georeferencing
  - add_three_light(): Configure scene lighting
  - remove_three_model(): Remove models by ID
  - update_three_model(): Update model transformations

- Created comprehensive example notebook demonstrating:
  - Basic 3D model integration
  - Multiple lighting configurations
  - Multiple models on a single map
  - Model updates and removal
  - Best practices and usage tips

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings October 25, 2025 02:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the MapLibre Three.js plugin, enabling 3D model rendering and 3D Tiles visualization on MapLibre maps using Three.js and GLTF models.

  • Adds JavaScript integration for Three.js, GLTFLoader, and the MapLibre Three Plugin
  • Implements Python API methods for initializing 3D scenes, managing models, lights, and 3D Tiles datasets
  • Provides comprehensive example notebook demonstrating various 3D rendering capabilities

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docs/examples/maplibre_three_plugin_example.ipynb Example notebook showcasing 3D model loading, lighting, and 3D Tiles rendering with various configurations
anymap/static/maplibre_widget.js JavaScript implementation for loading Three.js dependencies, managing 3D objects, lights, and 3D Tiles rendering
anymap/maplibre.py Python API methods for Three.js scene initialization, model/light management, and 3D Tiles operations
Comments suppressed due to low confidence (1)

docs/examples/maplibre_three_plugin_example.ipynb:1

  • Inconsistent environment variable name. Line 365 retrieves 'CESIUM_TOKEN' but line 367 instructs users to set 'CESIUM_ION_TOKEN'. These should match.
{

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread anymap/maplibre.py Outdated
Comment thread anymap/maplibre.py
Example:
>>> m = MapLibreMap(center=[148.9819, -35.3981], zoom=18, pitch=60)
>>> m.init_three_scene()
>>> m.add_three_light(type='ambient')
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name in the examples is incorrect. Should be light_type='ambient', light_type='directional', and light_type='sun' to match the function signature.

Copilot uses AI. Check for mistakes.
Comment thread anymap/maplibre.py Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 25, 2025

@github-actions github-actions Bot temporarily deployed to pull request October 25, 2025 02:14 Inactive
giswqs and others added 2 commits October 24, 2025 22:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot temporarily deployed to pull request October 25, 2025 02:16 Inactive
@giswqs giswqs merged commit ae9c35a into main Oct 25, 2025
8 checks passed
@giswqs giswqs deleted the claude/add-maplibre-three-plugin-011CUSsagMtynNWph4odWWmJ branch October 25, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants