Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show how to incorporate rollbar error handler in a TerriaMap instance #432

Draft
wants to merge 1 commit into
base: mobx
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Terria from 'terriajs/lib/Models/Terria';
import updateApplicationOnHashChange from 'terriajs/lib/ViewModels/updateApplicationOnHashChange';
// import updateApplicationOnMessageFromParentWindow from 'terriajs/lib/ViewModels/updateApplicationOnMessageFromParentWindow';
import ViewState from 'terriajs/lib/ReactViewModels/ViewState';
// import RollbarErrorProvider from 'terriajs/lib/Models/RollbarErrorProvider';
import BingMapsSearchProviderViewModel from 'terriajs/lib/Models/BingMapsSearchProvider';
// import GazetteerSearchProviderViewModel from 'terriajs/lib/ViewModels/GazetteerSearchProviderViewModel.js';
// import GnafSearchProviderViewModel from 'terriajs/lib/ViewModels/GnafSearchProviderViewModel.js';
Expand Down Expand Up @@ -83,6 +84,10 @@ module.exports = terria.start({
// new GnafSearchProviderViewModel({terria})
];

// viewState.errorHandler = new RollbarErrorProvider({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the instance of config being loaded from magda, have you checked whether configParameters correctly reflects the rollbarAccessToken after the terria.start call?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I would think that yes it does but i'm not 100%)

// terria: terria
// });

// Automatically update Terria (load new catalogs, etc.) when the hash part of the URL changes.
updateApplicationOnHashChange(terria, window);
// updateApplicationOnMessageFromParentWindow(terria, window);
Expand Down