MapLibre Integration¶
In this section, you'll learn about the maplibre-gl-terradraw plugin and how to create production-ready applications with Terra Draw and MapLibre GL JS.
Introduction to maplibre-gl-terradraw¶
maplibre-gl-terradraw is a specialized plugin that provides enhanced integration between Terra Draw and MapLibre GL JS. It was created to simplify the integration process and provide additional features specifically tailored for MapLibre GL JS applications.
Why Use maplibre-gl-terradraw?¶
While you can use Terra Draw directly with the MapLibre adapter, the maplibre-gl-terradraw plugin offers several advantages:
- Simplified API - Easier setup and configuration for MapLibre applications
- Built-in Controls - Ready-to-use UI controls that integrate with MapLibre's control system
- Enhanced Styling - Additional styling options optimized for MapLibre GL JS
- Better Performance - Optimizations specific to MapLibre GL JS rendering
- Production Ready - Battle-tested in real-world applications
You can find comprehensive documentation at https://terradraw.water-gis.com.
When to Choose Each Approach¶
Approach | Best For | Use Case |
---|---|---|
Direct Terra Draw | Multi-library support, maximum flexibility | Apps that might switch mapping libraries |
maplibre-gl-terradraw | MapLibre-focused apps, rapid development | Production MapLibre applications |
What's Next?¶
Let's learn how to use the maplibre-gl-terradraw plugin in practice.
Next: Basic Usage