@mappedin/mappedin-js

mappedin-ops
esm Styles
@mappedin/mappedin-js JS library homepage @mappedin/mappedin-js JS library on npm Download @mappedin/mappedin-js JS library

## Resources

Version 5.51.0 License UNLICENSED
@mappedin/mappedin-js JS library homepage
@mappedin/mappedin-js JS library on GitHub
@mappedin/mappedin-js JS library on npm
Download @mappedin/mappedin-js JS library
INSTALL
Type:
Version:
No default CSS file set by the package author so the URL is guessed. You can always browse all package files to use another one.

Mappedin JS

Resources

Usage

Installation

npm install @mappedin/mappedin-js

or

yarn add @mappedin/mappedin-js

Getting Started

import { getVenue, showVenue, E_SDK_EVENT } from '@mappedin/mappedin-js';
import '@mappedin/mappedin-js/lib/index.css';

async function init() {
    const venueData = await getVenue({
        clientId: '<clientId>',
        clientSecret: '<clientSecret>',
        venue: '<venue>',
    });

    const mapView = await showVenue(document.getElementById('mappedin-map'), venueData);
    mapView.FloatingLabels.labelAllLocations();
    mapView.addInteractivePolygonsForAllLocations();
    mapView.on(E_SDK_EVENT.CLICK, ({ polygons }) => {
        console.log(`Polygon with id ${polygons[0].id} clicked!`);
    });
}
document.addEventListener('DOMContentLoaded', init);

For full documentation, read our Getting Started guide on the Developer Portal. Developers using React or Angular should follow our Using React or Using Angular guides.