csis-architecture

Map Component

The Map Component is understood as a reusable, flexible and highly configurable Building Block meant to be used throughout CSIS. It is envisioned as an embeddable component that can be easily adapted to different parts of the common CSIS UI. The core functionalities of this component must be a clear and easy visualization of different maps and layers. It is also a key feature of the map component to allow for a degree of interactivity meant to enable users to better define locations, elements at risk, hazards, scenario results, etc.

Requested functionality

Baseline requirements elicitation and the assessment of presently available Test Cases have yielded the following functional requirements for this Building Block:

Baseline functionality

Functionality requested by CSIS Test Cases

Functionality requested by DC Test Cases

Technology support

Figure 24 gives an overview on the technological possibilities and the related open-source frontend and backend software components that have been selected for the Technology Support Plan.

Figure 24: Map Component Technology Support

The high interactivity and flexibility expected from this component requires an approach based on responsive and highly adaptable technologies. This approach can be achieved using client-side rendering along with libraries and tools that have already proved their usability and popularity, meaning that a big and active community is supporting their development and use. To ensure this high interactivity approach of this web application a good approach would be to use React, React allows rich site interactions, fast website rendering after the initial load, and a good selection of JavaScript libraries. It is also designed to build encapsulated components that can be composed to make complex UIs. In consequence, the Map Component is developed as independent HTML5/AJAX RIA that is loosely embedded as HTML5 iframe in the UI Integration Platform (Drupal 8, see 7.5) and relies as backend on Data Repository (7.4) and various OGC Services, respectively.

In terms of an open-source solution for the map itself, a proposed solution will be the use of Mapbox GL and Leaflet depending on the necessities of each map or layer. Mapbox provides a number of tools to build maps into a website or application. It is an open source JavaScript library that can be used to display maps, add interactivity, and customize the map experience. There are also a number of plugins for extending the map’s functionality with drawing tools and interfaces to Mapbox web services APIs like the Mapbox Geocoding API or Mapbox Directions API.

https://www.mapbox.com/help/define-mapbox-gl/

While Leaflet is meant to be as lightweight as possible, and focuses on a core set of features, an easy way to extend its functionality is to use third-party plugins developed by an active community.

http://leafletjs.com/

Figure 25 shows an example from CRISMA project where Leaflet has been used for the visualisation of different maps, including geophysical hazard maps.

Figure 25: Leaflet Example