Mappedin SDK - v6.0.1-beta.16

Mappedin Web SDK

npm install @mappedin/mappedin-js

or

yarn add @mappedin/mappedin-js

import { getMapData, show3dMap } from '@mappedin/mappedin-js';

async function init() {
const mapData = await getMapData({
key: '<key>',
secret: '<secret>',
mapId: '<mapId>',
});
const mapContainer = document.getElementById('app');
const map = await show3dMap(mapContainer, mapData);
map.Labels.all();
map.on('click', event => {
const { coordinate } = event;
const { latitude, longitude } = coordinate;
console.log(`Map was clicked at ${latitude}, ${longitude}`);
});
}
init();

For full documentation, read our Getting Started guide on the Developer Portal.