- add code for quering sos api
This commit is contained in:
parent
5f2dd2851b
commit
5740a5ddc3
11 changed files with 321 additions and 58 deletions
|
|
@ -4,50 +4,69 @@ import { BrowserModule } from "@angular/platform-browser";
|
|||
import { AppComponent } from './app.component';
|
||||
import { MapComponent } from './map/map.component';
|
||||
|
||||
import { HttpClientModule } from '@angular/common/http'; //for http requests
|
||||
// import {
|
||||
// HelgolandServicesConnector
|
||||
// } from '@helgoland/core';
|
||||
|
||||
import { HttpClientModule, HttpClient, HttpXhrBackend } from '@angular/common/http'; //for http requests
|
||||
// import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
// import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
import { MarkerService } from './marker.service';
|
||||
import { MarkerService } from './services/marker.service';
|
||||
|
||||
// siehe https://52north.github.io/helgoland-toolbox/additional-documentation/how-tos/integrate-a-map-component.html
|
||||
// https://52north.github.io/helgoland-toolbox/components/LocateControlComponent.html#source
|
||||
// import { HelgolandMapControlModule, HelgolandMapSelectorModule } from '@helgoland/map';
|
||||
// import { HelgolandSelectorModule } from '@helgoland/selector';
|
||||
// import { HelgolandDatasetlistModule } from '@helgoland/depiction';
|
||||
// import { DatasetApiInterface, SplittedDataDatasetApiInterface } from '@helgoland/core';
|
||||
import { DatasetApiInterface, ApiV3InterfaceService, SplittedDataDatasetApiInterface, DatasetApiV3Connector,HelgolandServicesConnector, DatasetApiV1ConnectorProvider, DatasetApiV2ConnectorProvider,
|
||||
DatasetStaConnectorProvider, DatasetApiV3ConnectorProvider } from '@helgoland/core';
|
||||
import { HelgolandCoreModule, HttpService} from "@helgoland/core";
|
||||
|
||||
// import 'core-js';
|
||||
|
||||
@NgModule({
|
||||
// declarations: The components, directives, and pipes that belong to this NgModule.
|
||||
declarations: [AppComponent, MapComponent],
|
||||
// imports: Other modules whose exported classes are needed by component templates declared in this NgModule.
|
||||
imports: [BrowserModule, HttpClientModule],
|
||||
// TranslateModule.forRoot({
|
||||
// loader: {
|
||||
// provide: TranslateLoader,
|
||||
// useFactory: HttpLoaderFactory,
|
||||
// deps: [HttpClient]
|
||||
// }
|
||||
// }),
|
||||
// HelgolandSelectorModule, HelgolandMapControlModule, HelgolandMapSelectorModule, HelgolandDatasetlistModule],
|
||||
providers: [
|
||||
MarkerService,
|
||||
// {
|
||||
// provide: DatasetApiInterface,
|
||||
// useClass: SplittedDataDatasetApiInterface
|
||||
// }
|
||||
],
|
||||
// bootstrap: The main application view, called the root component, which hosts all other application views.
|
||||
// Only the root NgModule should set the bootstrap property.
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {
|
||||
constructor() {}
|
||||
}
|
||||
// declarations: The components, directives, and pipes that belong to this NgModule.
|
||||
declarations: [AppComponent, MapComponent],
|
||||
// imports: Other modules whose exported classes are needed by component templates declared in this NgModule.
|
||||
imports: [BrowserModule, HttpClientModule, HelgolandCoreModule],
|
||||
// TranslateModule.forRoot({
|
||||
// loader: {
|
||||
// provide: TranslateLoader,
|
||||
// useFactory: HttpLoaderFactory,
|
||||
// deps: [HttpClient]
|
||||
// }
|
||||
// }),
|
||||
// HelgolandSelectorModule, HelgolandMapControlModule, HelgolandMapSelectorModule, HelgolandDatasetlistModule],
|
||||
providers: [
|
||||
MarkerService,
|
||||
{
|
||||
provide: DatasetApiInterface,
|
||||
useClass: SplittedDataDatasetApiInterface
|
||||
},
|
||||
// {
|
||||
// provide: HttpClient
|
||||
// },
|
||||
// {provide:'api', useValue: 'https://geomon.geologie.ac.at/52n-sos-webapp/api/' },
|
||||
{
|
||||
provide: HelgolandServicesConnector,
|
||||
useClass: DatasetApiV3Connector,
|
||||
deps: [HttpXhrBackend]
|
||||
},
|
||||
// DatasetApiV1ConnectorProvider,
|
||||
// DatasetApiV2ConnectorProvider,
|
||||
DatasetApiV3ConnectorProvider,
|
||||
// DatasetStaConnectorProvider
|
||||
],
|
||||
// bootstrap: The main application view, called the root component, which hosts all other application views.
|
||||
// Only the root NgModule should set the bootstrap property.
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {
|
||||
constructor() { }
|
||||
}
|
||||
|
||||
// export function HttpLoaderFactory(http: HttpClient) {
|
||||
// return new TranslateHttpLoader(http);
|
||||
// }
|
||||
|
||||
|
||||
// https://medium.com/@hubert.zub/using-babel-7-and-preset-typescript-to-compile-angular-6-app-448eb1880f2c
|
||||
Loading…
Add table
Add a link
Reference in a new issue