Proximap components

Note: Each component that is not always visible has a method to update its visibility based on the app state.

Map

The map is the main component of the app, and is always visible (though sometimes in the background).

Private Methods

update()
This function updates the map to display desired information. It watches: appManager.mode to determine whether to show filtered fountains, a route, or just a single fountain dataManager.fountains_filtered, fountain_selected, and route_data in order to update the data displayed in the map
update_user_location(user_location)
This function displays the user’s current location on the map.
display_route(route_data)
If the app is in route mode, this function displays the route on the map.
display_fountains(fountains_filtered)
If the app is in map mode, this function displays the filtered fountains on the map.
display_selected_fountain(fountain_selected)
If the app is in details mode, this function displays the selected fountain on the map.

Public Methods

Public methods can be called from the DOM or from other components/services.

select(fountain_id)
The user can select a fountain in the map. The function modifies the URL parameter accordingly.
set_user_location(coordinates)
The user can set their location via the map as an alternative to automatic localization.
refresh()
Force the map to refresh

List

_images/list_pane.png

Features

Sort list elements by proximity, name, or construction date.

Private Methods

update()
This function updates the list when the fountains_filtered data in the dataManager has been modified. It is triggered by a subscription to that data.

Public Methods

select(fountain_id)
The user can select a fountain in the list. The function modifies the URL parameter accordingly.

Details pane

_images/details.png

This pane displays information about the selected fountain. Information included in this pane depends on what is made available from the data sets, but it could include: - Construction year of fountain (e.g. 1951) - Type of water (e.g. Well water) - Water quality (e.g. drinking water/not drinking water) The pane also shows information available from Wikidata and/or Wikimedia, including a detailed description and photos of the fountain.

Private Methods

update()
This function updates the displayed information when the fountain_selected data in the dataManager has been modified. It is triggered by a subscription to that data.

Public Methods

show_route()
This function changes the mode of the app to route and triggers a route search between the user’s current location and the selected fountain. The route search is managed in the dataManager.