## 2 Materials and Methods
### System Architecture  
The system architecture of the application under consideration primarily hinges on the Unity game engine, specifically Unity version 2022.3. Unity is chosen for its exceptional support of lightweight applications and cross-platform capabilities, which aligns with our vision of creating a lightweight and device-agnostic framework. Figure 1 presents the overview of the system architecture.  
This application is designed to be accessible through web browsers to ensure broad accessibility. Moreover, the application offers immersive experiences through various VR devices. To enable this compatibility, the \"WebXR exporter\" SDK for Unity is utilized. Rigorous testing has been conducted with devices such as Oculus Quest and Magic Leap to verify compatibility. Furthermore, the application harnesses the VRTK to integrate the controllers of the VR device. The VRTK SDK's device-agnostic design is instrumental in capturing inputs from different controller types. This design choice was made to ensure a standardized and seamless experience for users across various VR environments.  
The system architecture of the application reflects a methodical blend of advanced technology and inclusivity. Unity, combined with the WebXR exporter and VRTK, forms the foundation for a versatile, immersive, and user-friendly environment. This architectural approach aims to deliver a comprehensive and standardized user experience.  
**Game Manager Component**: In the context of Unity applications, a game manager serves as a central component responsible for managing the application's states and logic.  
Figure 1: System architecture and components with sample datasets and use cases.  
It acts as a coordinator, ensuring seamless communication between various modules of the game. In our application, the game manager module plays a crucial role in controlling the available features. While the invocation of third-party APIs is delegated to a dedicated module, it is always initiated through the game manager. This design choice is attributed to the dynamic loading of the map, where the need for API invocation is contingent on specific conditions. Moreover, the game manager module also houses the control logic necessary to handle the dynamic zooming feature. This logic enables the application to respond to user-initiated zooming actions by adjusting the map's level of detail, enhancing visuals when the camera is focused on smaller areas, and reducing image quality when zooming out to save on performance.  
**WebXR Exporter and Multiplatform Support**: WebXR is an innovative, open-source SDK that allows developers to export a WebGL build of the Unity games. This application utilized the WebXR exporter to produce the final build for direct use by other platforms. This build is hosted on a static web host, making it accessible to PCs and VR devices through web browsers. Hosting the finished build in this way reduced the necessity of having separate builds catered to the particular needs of individual devices and platforms.  
**Dynamic Location Update**: The application offers the ability to update the map dynamically in response to user requests. Users can input longitude and latitude values, enabling the application to load any desired location, even locations outside of the continental United States. This functionality is achieved through the utilization of the AbstractMapScript.UpdateMap() method, a feature provided by Mapbox. Notably, this method streamlines the process by eliminating the need for map re-initialization. Furthermore, it facilitates the conversion of longitude and latitude values into world coordinates. The application also allows for dynamic zooming capabilities. Users can navigate the scene both horizontally and vertically, effectively zooming in or out. The application intelligently adjusts the level of detail displayed based on the user's zoom level. Similar to the map updating function, this dynamic zooming feature is also managed by the AbstractMapScript.UpdateMap() method provided by Mapbox.