Skip to content

Latest commit

 

History

History
64 lines (55 loc) · 2.66 KB

README.md

File metadata and controls

64 lines (55 loc) · 2.66 KB

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