Skip to content

Commit

Permalink
fix: provider import (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecarn committed May 16, 2024
1 parent a41329e commit 332d6ee
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
27 changes: 26 additions & 1 deletion src/app/pages/portal/portal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
22 changes: 2 additions & 20 deletions src/app/pages/portal/portal.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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'
})
Expand Down

0 comments on commit 332d6ee

Please sign in to comment.