Getting Started with Wemap SDK
The Wemap SDK provides comprehensive location tracking, routing, and navigation capabilities for web applications. This guide will help you get started with the SDK, focusing on the positioning package.
Overview
The Wemap SDK is organized into several packages:
- @wemap/core: Core SDK initialization and configuration
- @wemap/positioning: Location tracking and positioning (VPS, GNSS/WiFi)
- @wemap/routing: Route calculation and navigation
- @wemap/camera: Camera access for visual positioning
Map Package Not Available
The map rendering package (@wemap/map) is coming soon. Today you need to use a third-party mapping library (such as Mapbox GL JS, Leaflet, or Google Maps) for map visualization when building custom integrations.
Installation
npm install @wemap/core @wemap/positioning @wemap/routing @wemap/camera
Core SDK Initialization
Before using any SDK features, you must initialize the Core SDK with your livemap ID and authentication token.
import { core } from '@wemap/core';
// Initialize the SDK
await core.init({
emmid: 'your-map-id',
token: 'your-authentication-token',
env: 'production' // or 'development'
});
Initialization Options
- emmid (required): Your livemap ID
- token (required): Authentication token for API access
- env (optional): Environment -
'production'(default) or'development'
The Core SDK initialization fetches livemap configuration data that is used by other packages (like VPS endpoint configuration).