@mappedin/mappedin-js
TypeScript icon, indicating that this package has built-in type declarations

5.34.1 • Public • Published

Mappedin Web SDK

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @mappedin/mappedin-js

Weekly Downloads

778

Version

5.34.1

License

UNLICENSED

Unpacked Size

10.5 MB

Total Files

27

Last publish

Collaborators

  • mappedin-ops