It imports Leaflet, Esri Leaflet, ArcGIS REST JS, and Esri Leaflet Geocoder libraries from content delivery networks (CDNs).
It sets up a tile layer using OpenStreetMap tiles and adds it to the map.
Users can search for classrooms by entering a query in an input field and clicking a "Search" button. The search triggers a JavaScript function searchClassroom().
When a classroom is found, its details like building, floor, room number, and capacity are displayed in a table. The relevant information is fetched using the getClassroomInfo() function.
The page includes hidden tables with information about buildings, floors, and classrooms. These tables serve as a data source for searching and displaying classroom information.
- showPlaces(category): Displays places of a specified category on the map using Esri Leaflet Geocoding.
- updateRoute(): Updates the route between two points on the map using ArcGIS REST JS routing service.
- searchClassroom(): Searches for a classroom entered by the user and displays its information.
- getClassroomInfo(classroom): Retrieves information about a classroom from a predefined list of classrooms.