@wayfarer-gl/core
v1.1.0
Published
Wayfarer GL Core library for map animation
Downloads
20
Maintainers
Readme
@wayfarer-gl/core
The core engine for Wayfarer-GL, providing high-performance map animation and route tracking for MapLibre GL.
Installation
npm install @wayfarer-gl/core
# or
pnpm add @wayfarer-gl/coreUsage
import { WayfarerMap } from '@wayfarer-gl/core';
const map = new WayfarerMap(containerElement, {
data: {
line: [...],
point: [...]
},
darkMode: true
});
// Update progress manually (0 to 1 for a segment)
map.updateProgress(0, 0.5);Features
- Damped Camera: Physics-based camera movement for smooth transitions.
- Route Layers: Automated management of route, progress, and stop point layers.
- Theme Support: Easy switching between Light/Dark styles without losing state.
- TypeScript: First-class type definitions for all configurations.
