This project is an interative map of the facilities available at Diamond Light Source. It uses Leaflet to make the map. This project was developed by myself and was undertaken by A-Level students as a week long work experience project at Diamond Light Source. This repository presents the complete solution, but the project can be progressively constructed following the steps below.
- Initialize a basic HTML project with a "Hello World" template, including elements such as 'h1', 'p', and 'div' – Reference: w3 schools.
- Introduction to the concept of identifiers (IDs) in HTML.
- Illustration of CSS styling applicable to all elements (e.g., body).
- Further discussion about the usage and benefits of IDs in web development.
- Demonstrate how to apply specific styles to selected elements.
- Introduction to JavaScript by creating a simple "Hello World" alert in the same HTML file.
- Progression to using a separate JavaScript file for script execution.
- Demonstration of a "Hello World" alert triggered by a click on a text element.
- Explanation of JavaScript variable syntax and its importance.
- Implementation of Leaflet to display a map on the webpage.
- Placement of a marker on the map indicating Diamond's location.
- Addition of a popup dialog associated with the Diamond location marker.
- Based on the student's proficiency with JavaScript, introduce the concepts of 'fetch' and 'JSON parsing'. If the concepts are too advanced, directly paste the required JSON into the file.
- Addition of markers on the map for all beamline locations at Diamond Light Source.
- Integration of popup dialogs for each of the beamline markers.
- Grouping of markers into overlays for toggle-based visibility control.
- Addition of Diamond Light Source attribution to the map.
- Implementation of a user location marker on the map.
- Upload the project to GitHub pages and perform on-site testing at Diamond Light Source.
- Addition of a feature to find the nearest marker on the map.
- Styling enhancement for the "Find Closest Marker" button.
- [Not implemented] Inclusion of a feature for location marker rotation based on user's facing direction.
Simpily start a http server in the same directory and go to the index.html
Here is an example of how you can do this using python
python -m http.server
This will allow you to access the website on localhost:8000