diff --git a/.gitignore b/.gitignore index 0eed0de1a..e68347b20 100644 --- a/.gitignore +++ b/.gitignore @@ -25,5 +25,6 @@ deploy/work/ packages/ pancake/ yarn-error.log +.npmrc package-lock.json diff --git a/CHANGES.md b/CHANGES.md index c6df0d327..db2a31df2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,13 @@ - [The next improvement] +### `0.0.9` + +**2023-11-24** + +- Updated TerriaJS to `8.3.9`. +- Moved to new Search Provider model. Search Providers are now configured in `config.json` `searchProviders`. For example configuration see https://docs.terria.io/guide/customizing/search-providers/ + ### `0.0.8` **2023-08-11** diff --git a/index.js b/index.js index e4e271f52..6aabae7ed 100644 --- a/index.js +++ b/index.js @@ -5,24 +5,18 @@ var terriaOptions = { }; import { runInAction } from "mobx"; - -// checkBrowserCompatibility('ui'); import ConsoleAnalytics from "terriajs/lib/Core/ConsoleAnalytics"; import GoogleAnalytics from "terriajs/lib/Core/GoogleAnalytics"; import ShareDataService from "terriajs/lib/Models/ShareDataService"; // import registerAnalytics from 'terriajs/lib/Models/registerAnalytics'; -// import registerCatalogMembers from 'terriajs/lib/Models/registerCatalogMembers'; import registerCustomComponentTypes from "terriajs/lib/ReactViews/Custom/registerCustomComponentTypes"; 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 BingMapsSearchProviderViewModel from "terriajs/lib/Models/SearchProviders/BingMapsSearchProvider"; -// import GazetteerSearchProviderViewModel from 'terriajs/lib/ViewModels/GazetteerSearchProviderViewModel.js'; -// import GnafSearchProviderViewModel from 'terriajs/lib/ViewModels/GnafSearchProviderViewModel.js'; -// import defined from 'terriajs-cesium/Source/Core/defined'; import render from "./lib/Views/render"; import registerCatalogMembers from "terriajs/lib/Models/Catalog/registerCatalogMembers"; +import registerSearchProviders from "terriajs/lib/Models/SearchProviders/registerSearchProviders"; import defined from "terriajs-cesium/Source/Core/defined"; import loadPlugins from "./lib/Core/loadPlugins"; import plugins from "./plugins"; @@ -53,6 +47,9 @@ const viewState = new ViewState({ }); registerCatalogMembers(); +// Register custom search providers in the core TerriaJS. If you only want to register a subset of them, or to add your own, +// insert your custom version of the code in the registerSearchProviders function here instead. +registerSearchProviders(); if (process.env.NODE_ENV === "development") { window.viewState = viewState; @@ -87,15 +84,6 @@ module.exports = terria terria.loadInitSources().then((result) => result.raiseError(terria)); try { - viewState.searchState.locationSearchProviders = [ - new BingMapsSearchProviderViewModel({ - terria: terria, - key: terria.configParameters.bingMapsKey - }) - // new GazetteerSearchProviderViewModel({terria}), - // new GnafSearchProviderViewModel({terria}) - ]; - // Automatically update Terria (load new catalogs, etc.) when the hash part of the URL changes. updateApplicationOnHashChange(terria, window); updateApplicationOnMessageFromParentWindow(terria, window); diff --git a/package.json b/package.json index 926af2b0c..9bbd5f6fc 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ ] }, "name": "terriajs-map", - "version": "0.0.8", + "version": "0.0.9", "description": "Geospatial catalog explorer based on TerriaJS.", "license": "Apache-2.0", "engines": { @@ -74,7 +74,7 @@ "semver": "^5.0.0", "style-loader": "^0.23.1", "svg-sprite-loader": "4.1.3", - "terriajs": "8.3.2", + "terriajs": "8.3.9", "terriajs-cesium": "1.92.0-tile-error-provider-fix-2", "ts-loader": "^5.3.3", "typescript": "^4.9.5", diff --git a/wwwroot/config.json b/wwwroot/config.json index 031d979c3..c874fe106 100644 --- a/wwwroot/config.json +++ b/wwwroot/config.json @@ -5,10 +5,8 @@ "googleUrlShortenerKey": null, "googleAnalyticsKey": null, "googleAnalyticsOptions": null, - // Log ConsoleAnalytics events to console // logToConsole: true, - /* Text that appears at the bottom of the map */ "disclaimer": { "text": "Disclaimer: This map must not be used for navigation or precise spatial analysis", @@ -21,7 +19,6 @@ url: "#" }, */ - // Pop-up disclaimer that will be shown at the start // The text of the disclaimer is in lib/Views/GlobalDisclaimer.html // globalDisclaimer: { @@ -34,7 +31,6 @@ // //devHostRegex: "\\b(staging|preview|test|dev)\\.", // enableOnLocalhost: true // If false, don't show this when running on localhost // }, - /* developerAttribution: { text: "Your organisation", @@ -42,7 +38,6 @@ },*/ // This is used in various text messages. You should also set