SIMPLE MAP DIAGRAMS

Simple Map Diagrams is a versatile JavaScript library that streamlines the creation of highly specific and customizable interactive mini-maps for your webpage.

Getting Started

Now that you have the Simple Map Diagrams code loaded in, you can start adding maps to you webpage! In a separate script, you may instantiate and set up an instance of Simple Map Diagram as follows:

const smd = new SimpleMapDiagram(10, 5, 'sample title', 'sample description', 'example1')

This call will go through a series of tasks to set up all the necessary objects and containers needed for the map, and add it to the document, under the container specified by the given id (in this case, the element with id 'example1'). Once this is done, you are ready to start customizing the map! See the list of API functions below for instructions on how to do so.




List of API Functions

smdInstance.defaultSetUp()


smdInstance.addConnection(x1, y1, x2, y2)


smdInstance.addMultipleConnections(connections)


smdInstance.addBlockPlace(x, y, width, height, type, name, description)


smdInstance.addLinePlace(x1, y1, x2, y2, type, name, description)


smdInstance.addNodePlace(x, y, type, name, description)


smdInstance.addInfoBox()


smdInstance.addNavigationMenu()


smdInstance.addFilterByClassBox()


smdInstance.addFilterByNameBox()


smdInstance.addLegend()




Place Types

Listed below are all the categories of places currently supported.

Block Places:


Line Places:


Node Places: