Skip to content

🗺️ A vanilla JavaScript library made for easily showing global connections visually on a webpage

Notifications You must be signed in to change notification settings

jameskokoska/Map-Connections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map Connections

Getting Started

The libraries starter guide, examples, and documentation can be viewed here: https://jameskokoska.github.io/Map-Connections/

Installing the Library

Add the Library and Depend on it

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.

Create a Simple Map

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."
})

Starter Guide available here: https://jameskokoska.github.io/Map-Connections/starter-guide.html

API Documentation available here: https://jameskokoska.github.io/Map-Connections/api-documentation.html

Other Information

Sources

Other Libraries Used

GitHub Hosting