Get started
Lite is published on npm as @magiclane/maps-sdk-lite and is installed under the official package name using an npm alias, so existing imports keep working unchanged.
Installation
npm install @magiclane/maps-sdk@npm:@magiclane/maps-sdk-lite@^0.3.1
Your package.json keys the dependency as "@magiclane/maps-sdk":
{
"dependencies": {
"@magiclane/maps-sdk": "npm:@magiclane/maps-sdk-lite@^0.3.1"
}
}
Switching to the full WASM SDK later is the same line in reverse: "@magiclane/maps-sdk": "^1.3.2".
Quick start
The code is identical to the full SDK — see the Get started guide:
import { GemKit, GemMap } from '@magiclane/maps-sdk';
// Initialize with your API token
const gemKit = await GemKit.initialize('YOUR_API_TOKEN_HERE');
// Get the map container
const container = document.getElementById('map-container');
// Create the map
const wrapper = gemKit.createView(1, (gemMap: GemMap) => {
console.log('Map ready!');
});
if (wrapper && container) {
container.appendChild(wrapper);
}
Search, routing, and weather endpoints
Search, routing, isochrones, and weather are served by Magic Lane REST services. In development, proxy them through your dev server so the token stays out of the browser: /api/search, /api/route, /api/isochrones, and /api/weather, with MAGICLANE_TOKEN read from .env.local.
Browser compatibility
Lite requires a modern browser with WebGL — Chrome 90+, Firefox 89+, Safari 15+, Edge 90+. There is no WebAssembly requirement.
Versioning
Each Lite release mirrors a specific full-SDK API surface. Lite 0.3.x tracks @magiclane/maps-sdk 1.2.x — the compatibility matrix is generated against that version. Lite is in alpha: expect the covered surface to grow (and occasionally shift) between 0.x releases.