diff --git a/src/app/pages/portal/portal.component.ts b/src/app/pages/portal/portal.component.ts index cc9b45c79..2fa720cc6 100644 --- a/src/app/pages/portal/portal.component.ts +++ b/src/app/pages/portal/portal.component.ts @@ -100,8 +100,19 @@ import { handleFileImportError, handleFileImportSuccess, moveToOlFeatures, + provideDirection, + provideSearch, sourceCanReverseSearch, - sourceCanSearch + sourceCanSearch, + withCadastreSource, + withCoordinatesReverseSource, + withIChercheReverseSource, + withIChercheSource, + withILayerSource, + withNominatimSource, + withOsrmSource, + withStoredQueriesSource, + withWorkspaceSource } from '@igo2/geo'; import { AnalyticsListenerService, @@ -192,6 +203,20 @@ import { WelcomeWindowService } from './welcome-window/welcome-window.service'; WORKSPACE_DIRECTIVES, WorkspaceUpdatorDirective, IgoIconComponent + ], + providers: [ + provideSearch([ + withCadastreSource(), + withCoordinatesReverseSource(), + withIChercheReverseSource(), + withIChercheSource(), + withILayerSource(), + withNominatimSource(), + withStoredQueriesSource(), + withWorkspaceSource() + ]), + provideDirection(withOsrmSource()), + SearchState ] }) export class PortalComponent implements OnInit, OnDestroy { diff --git a/src/app/pages/portal/portal.module.ts b/src/app/pages/portal/portal.module.ts index 3dce78ee7..0448341a7 100644 --- a/src/app/pages/portal/portal.module.ts +++ b/src/app/pages/portal/portal.module.ts @@ -5,17 +5,8 @@ import { IgoDirectionsModule, IgoQueryModule, IgoSearchModule, - provideCadastreSearchSource, - provideCoordinatesReverseSearchSource, - provideIChercheReverseSearchSource, - provideIChercheSearchSource, - provideILayerSearchSource, - provideNominatimSearchSource, provideOptionsApi, - provideOsrmDirectionsSource, - provideStoredQueriesSearchSource, - provideStyleListOptions, - provideWorkspaceSearchSource + provideStyleListOptions } from '@igo2/geo'; import { AnalyticsListenerService } from '@igo2/integration'; @@ -25,23 +16,14 @@ import { PortalComponent } from './portal.component'; imports: [ IgoGestureModule.forRoot(), IgoQueryModule.forRoot(), - IgoSearchModule.forRoot(), + IgoSearchModule, IgoDirectionsModule, PortalComponent ], exports: [PortalComponent], providers: [ AnalyticsListenerService, - provideNominatimSearchSource(), - provideIChercheSearchSource(), - provideWorkspaceSearchSource(), - provideIChercheReverseSearchSource(), - provideCoordinatesReverseSearchSource(), - provideILayerSearchSource(), - provideStoredQueriesSearchSource(), - provideOsrmDirectionsSource(), provideOptionsApi(), - provideCadastreSearchSource(), provideStyleListOptions({ path: './assets/list-style.json' })