Skip to content

Commit

Permalink
feat(search): separe search and query results
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Jun 12, 2019
1 parent bbbba1f commit fe228b3
Show file tree
Hide file tree
Showing 18 changed files with 372 additions and 814 deletions.
43 changes: 12 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ import { IgoSpinnerModule, IgoStopPropagationModule } from '@igo2/common';
import { IgoAuthModule } from '@igo2/auth';
import {
provideIChercheSearchSource,
provideIChercheReverseSearchSource,
provideNominatimSearchSource,
provideCoordinatesReverseSearchSource,
provideILayerSearchSource,
provideOsrmRoutingSource
} from '@igo2/geo';

import { environment } from '../environments/environment';
import { PortalModule } from './pages';
import { AppComponent } from './app.component';
import { AppReseauTransportQuebecModule } from './shared/search/sources/reseau-transport-quebec.module';

@NgModule({
declarations: [AppComponent],
Expand All @@ -32,8 +33,7 @@ import { AppReseauTransportQuebecModule } from './shared/search/sources/reseau-t
IgoMessageModule,
IgoSpinnerModule,
IgoStopPropagationModule,
PortalModule,
AppReseauTransportQuebecModule
PortalModule
],
providers: [
provideConfigOptions({
Expand All @@ -43,6 +43,8 @@ import { AppReseauTransportQuebecModule } from './shared/search/sources/reseau-t
RouteService,
provideNominatimSearchSource(),
provideIChercheSearchSource(),
provideIChercheReverseSearchSource(), // TODO: replace by territoire
provideCoordinatesReverseSearchSource(),
provideILayerSearchSource(),
provideOsrmRoutingSource()
],
Expand Down
27 changes: 15 additions & 12 deletions src/app/pages/portal/portal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,28 @@
</button>

<igo-search-bar
[term]="searchBarTerm"
[minLength]="minSearchTermLength"
(change)="onSearchTermChange($event)"
(search)="onSearch($event)">
</igo-search-bar>

<app-sidenav
[searchResult]="searchResult"
[map]="map"
[(opened)]="sidenavOpened">
</app-sidenav>

<igo-map-browser
#mapBrowser
igoQuery
[waitForAllQueries]="true"
igoMapContext
igoLayerContext
igoDropGeoFile
(query)="onMapQuery($event)"
[map]="map"
[igoContextMenu]=actionbarMenu
(menuPosition)="onContextMenuOpen($event)"
[ngClass]="{'igo-attribution-offset': map.getBaseLayers().length > 1}"
[@mapStateX]="sidenavOpened ? 'right' : 'left'"
(@mapStateX.start)="removeMapBrowserClass($event)"
Expand Down Expand Up @@ -90,17 +93,17 @@
</app-expansion-panel>

<app-toast-panel
[store]="searchStore"
[store]="queryStore"
[@toastPanelOffsetX]="sidenavOpened"
[@toastPanelOffsetY]="expansionPanelExpanded">
[@toastPanelOffsetY]="expansionPanelExpanded"
(resultSelect)="addFeatureToMap($event)">
</app-toast-panel>

<!-- <igo-toast
[map]="map"
[expanded]="toastOpened"
[feature]="featureService.focusedFeature$ | async"
(onOpened)="toastOpened=$event"
(swipeleft)="swipe($event.type)"
(swiperight)="swipe($event.type)"
*ngIf="toastShown">
</igo-toast> -->
<ng-template #actionbarMenu>
<igo-actionbar
[store]="contextMenuStore"
[withIcon]="false"
[horizontal]="true"
mode="context">
</igo-actionbar>
</ng-template>
Loading

0 comments on commit fe228b3

Please sign in to comment.