message: Location Picker catch instantiation errors e.g WebGL disabled
diff: @@ -107,6 +107,7 @@ class LocationPicker extends React.Component<IProps, IState> {
  zoom: 1,
  });
  + try {
  // Add geolocate control to the map.
  this.geolocate = new maplibregl.GeolocateControl({
  positionOptions: {
  @@ -117,7 +118,8 @@ class LocationPicker extends React.Component<IProps, IState> {
  this.map.addControl(this.geolocate);
  this.map.on('error', (e) => {
  - logger.error("Failed to load map: check map_style_url in config.json has a valid URL and API key", e.error);
  + logger.error("Failed to load map: check map_style_url in config.json has a valid URL and API key",
  + e.error);
  this.setState({ error: e.error });
  });
  @@ -132,6 +134,10 @@ class LocationPicker extends React.Component<IProps, IState> {
  });
  this.geolocate.on('geolocate', this.onGeolocate);
  + } catch (e) {
  + logger.error("Failed to render map", e.error);
  + this.setState({ error: e.error });
  + }
  }
  private addMarker(lngLat: maplibregl.LngLat): void {
  @@ -169,7 +175,7 @@ class LocationPicker extends React.Component<IProps, IState> {
  }
  componentWillUnmount() {
  - this.geolocate.off('geolocate', this.onGeolocate);
  + this.geolocate?.off('geolocate', this.onGeolocate);
  }
  private onGeolocate = (position: GeolocationPosition) => {
  