UNPKG

atriusmaps-node-sdk

Version:

This project provides an API to Atrius Personal Wayfinder maps within a Node environment. See the README.md for more information

2 lines (1 loc) 445 B
import{create as e}from"./app.js";const t={},r=e=>"undefined"!=typeof window&&window.alert?window.alert(e):console.error(e);async function a(a){if(!a)throw Error("Attempt to create App instance with no configuration");const n=a.appName||"Instance"+(Object.keys(t).length+1);a.appName=n;try{const r=await e(a);return t[n]=r,r}catch(e){console.error(e),e.message?r(e.message):r("Error creating map. Please try again later.")}}export{a as create};