@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
17 lines (16 loc) • 704 B
JavaScript
// SPDX-License-Identifier: Apache-2.0
import StreetViewComponent from './component.js';
/** The StreetView displaying the footage of Google Street View. */
export default class GoogleStreetViewComponent extends StreetViewComponent {
constructor() {
super('google');
}
async createAdapter() {
const apiKey = this.context.configManager.Config.streetview?.google?.apiKey;
if (!apiKey) {
throw new Error('The Google StreetView cannot be displayed: streetview.google.apiKey is not configured');
}
const { default: GoogleStreetViewProvider } = await import('./tools/googleprovider');
return new GoogleStreetViewProvider(apiKey);
}
}