Map is available at: [Site:URL]/map
-
Map has two views, one is a map view and the other one is a satellite view. We can switch between views by clicking on the earth icon on the top right corner.
-
The feature locations are available on the sidebar. When you click on location, the marker will populate on the map. The locations are categorized by location types. When you check mark the location type, multiple markers will populate on the map.
-
When you click on Marker, the sidebar will display the particular location with information associated with that location. All locations have a “Share” and “Directions” button.
-
The Share button on the sidebar will populate a unique URL for each building with a unique building id. We can use that URL in the website to populate that location. The embed code for that location will populate. We can use that embed code in the website to populate the location.
-
The Directions button will allow you to find out directions between two locations. Or if you are using a map in the mobile then Your Location feature will work. The checkbox “Only use accessible routes?” will find an accessible route. When you click on the route button, it will display detailed directions in the sidebar. It will display a blue colored polyline on the map connecting two locations.
Admin screen of the map is available at: [Site:URL]/map/admin
The following things to know:




How to find coordinates (Latitude and Longitude) for a specific location in the map?
Search location in the google map then right click on the place where you want to find Latitude and Longitude.
Use this link to open google map: https://www.google.com/maps/place/North+Carolina+Central+University/@35.974181,-78.9013848,16.5z/data=!4m5!3m4!1s0x89ace44586d35a27:0x53469c221685bc65!8m2!3d35.9752487!4d-78.899654
The admin screen of the map module displays the following buttons:
Toggle Sidewalks: This button shows and hides all available sidewalks on the map. Sidewalks are the pinpoint locations on the route across the map which connect edges and connections. The sidewalk locations are displayed as a violet circle. Each sidewalk has its unique ID.
Edit/Delete Sidewalk: When you click on the sidewalk, the Edit Sidewalk form will pop up. Where you can update or Delete the sidewalk location. When you remove a sidewalk, the connection and edges associated with that sidewalk will also be removed.
Add Sidewalks: This button opens the Add Sidewalks form where you can add a new sidewalk location. Adding a sidewalk is pretty easy. We only need to add the Latitude and Longitude of the location.
Toggle Connections: This button shows and hides all available connections on the map. Connections are the polyline which connects the feature location with the sidewalk. Each connection has its unique ID.
Edit/Delete Connections: When you click on the line, the Edit Connections form will pop up. Where you can update or Delete the Connection.
Add Connections: This button opens the Add Connections form where you can create new connections. To add a connection, select the building location which you want to connect with the sidewalk and add the ID of the Nearest Sidewalk. You can find your Sidewalk ID by clicking on the sidewalk. If the connection is accessible, then check mark the checkbox and hit submit. It is necessary to add a connection when you add a new feature location in order to populate the route.
Toggle Edges: This button shows and hides all available edges on the map. Edges are the polyline which connects sidewalks. Each edge has its unique ID.
Edit/Delete Edges: When you click on the line, the Edit Edges form will pop up. Where you can update or Delete the Edges.
Add Edges: This button opens Add Edges form where you can create new edges. To add an edge, you need two sidewalk IDs which you want to connect, the length between two sidewalks in seconds. And If the edge is accessible then check mark the checkbox.
Add Feature Location: This button opens the Add feature location form where you can enter information about a new location. The required information such as Building Name, Latitude, Longitude, Building Type. The optional information such as Inside Building, Website, Phone, Parking Type, Number of Accessible Parking, Bathroom Location, Printer Location. Make sure you do not create duplicate building names. After creating the feature location, make sure it is populating on the sidebar and it is searchable using the search bar. In order to create a route, make sure you add a connection for the newly added feature location. And add sidewalks and edges if needed.
Edit/Delete Feature Location: This button opens the Edit/Delete feature location form where you can edit information about the location. If you are editing latitude and longitude of the location, make sure you first remove the connections. When you delete a feature location, the connections with that location will also be removed automatically.
Add Building Type: This function opens the Add building type form where you can add a new building type. If a building type is not in the list, then you can add a new one.
Edit/Delete Building Type: This button opens the Edit/Delete building type form where you can edit the building type name or you can delete the selected building type.
Campus Map Version
The current mapbox version ID for tileLayer is “mapbox/streets-v12”
We need to update the id whenever the new version is available.
Please see below screenshot to update the id on the map.js file located at: docroot/sites/all/modules/custom/map/js/map.js

How to Add Building/Feature Location Labels?
If the feature location’s label is not available on the Campus Map then we can add manually.
Add them under the if statement where “New School of Business”, “Student Center”, and “Martha Street Apartments” added. Separate each location by comma. Make sure the label matches the feature location that is available on the sidebar of the Campus Map. For example:

Please see below screenshot to add the feature location on the map.js file located at: docroot/sites/all/modules/custom/map/js/map.js
