In the head
tag in your HTML, import the Map Connections library and CSS styles:
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jameskokoska/Map-Connections@latest/pub/mapConnectionsLibrary/mapConnectionsStyles.css">
<script defer type="text/javascript" src="https://cdn.jsdelivr.net/gh/jameskokoska/Map-Connections@latest/pub/mapConnectionsLibrary/mapConnections.js"></script>
...
</head>
There are no other dependencies required.
Add the HTML to your body, pass in the div ID when creating the map with JavaScript.
<div id="map-div"></div>
const map = new MapConnections({ divId:'map-div', width:400 })
map.addMarker({ top:200, left:100, title:"Marker Title", description:"Some description here." })
map.addMarkerApproxLongLat({ longitude:27, latitude:108 })
map.addConnection({
markerIndexStart: 0,
markerIndexEnd: 1,
animationDuration: 5000,
iconColor: 'red',
title: "Connection Title",
description: "Some description here."
})