Skip to content
Margrethe Amundsen edited this page Aug 24, 2022 · 6 revisions

Welcome to the map wiki!

This page is dedicated to the map part of the project.

MapLibrary

OpenLayers

openlayers.org

The project started with utilising the OpenLayers (OL) map library. This was chosen for the following reasons:

  • Free to use
  • Good (enough) documentation to get started
  • Experience from using it in other projects

After implementing OpenLayers into the application, we decided that it would be difficult to implement the functionality we wanted, and that other options would be better suited. The reasons for abandoning OL was:

  • Difficulty of implementing arrays of markers
  • Difficulty of accessing events related to markers

MapBox

mapbox.com

The project abandoned OL for a different map library, MapBox. MapBox was first tested in parallell with OL to verify that the functionality we wanted was available before switching over. After confirming that it would be a better fit the project was moved to MapBox. The features which made us switch to MapBox:

  • Great documentation
  • Wide range of functionality which fits with ideas on our roadmap

Negatives with using MapBox are the following:

  • Cost of using the platform (pay as you go)
  • Some problems with types when using it with typescript

React-map-gl

react-map-gl

React-map-gl is a React wrapper for Mapbox, making it easier to implement Mapbox and its functionalities when using React. Therefore, we decided to use this framework in our project.

The files related to the map, including markers, can be found within the following path: map/spa/src/features/map/

Clone this wiki locally