Load the Jawg Maps JavaScript libraries dynamically.
Available via npm as the package @jawg/js-loader.
npm i @jawg/js-loaderor
yarn add @jawg/js-loaderAlternatively you may add the umd package directly to the html document using the unpkg link.
<script src="https://unpkg.com/@jawg/[email protected]/dist/jawg-js-loader.js"></script>When adding via unpkg, the loader can be accessed at JawgJSLoader.
import JawgJSLoader from '@jawg/js-loader';
let loader = new JawgJSLoader({ accessToken: '<YOUR_ACCESS_TOKEN>' });
loader.loadJawgPlaces().then((JawgPlaces) => {
let jawgPlaces = new JawgPlaces.Input({ input: '#my-input' });
});Please submint an issue for new features or when something is not working properly.