Release 2074
Trello card
Context
We were sometimes seeing an error that was preventing Google Maps from zooming into the specified location.
To fix use the js-api-loader package to avoid the global callback.
Changes proposed in this pull request
- Load Google Maps in Stimulus controller instead of using
javascript_include_tagto attach a callback to the global object. - Update to use the Stimulus.js values API - Stimulus recommend passing data to controllers via the values API instead of the data API.
Guidance to review
Currently, if you go to a school and refresh a few times you will see a console error and the map will not load properly https://schoolexperience.education.gov.uk/candidates/schools/100027