Mappedin SDK - v6.0.1-alpha.19

Mappedin Web SDK

Resources

Usage

Installation

npm install @mappedin/mappedin-js

or

yarn add @mappedin/mappedin-js

Getting Started

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

async function init() {
const mapData = await getMapData({
key: '<key>',
secret: '<secret>',
mapId: '<mapId>',
});
const mapContainer = document.getQuerySelector('body');
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}`);
});
}
document.addEventListener('DOMContentLoaded', init);

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