Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coords format lat lon #888

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"e2e": "ng e2e --port 4300",
"postinstall": "ngcc --tsconfig src/tsconfig.app.json && gulp copyLocaleFromLib",
"build.prod": "ng build --configuration production",
"build.github": "npm build --configuration=github --output-path ./dist/ghpages --base-href /igo2/",
"build.github": "ng build --configuration=github --output-path ./dist/ghpages --base-href /igo2/",
"build.pwa": "ng build --configuration pwa --output-path ./dist/pwa",
"serve.prod": "http-server ./dist/igo2/ --port 4201 --no-browser",
"serve.pwa": "http-server ./dist/pwa/ --port 4201 --no-browser",
Expand Down
2 changes: 2 additions & 0 deletions src/app/pages/portal/portal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
(pointerSummaryStatus)="onPointerSummaryStatusChange($event)"
[searchResultsGeometryEnabled]="searchResultsGeometryEnabled"
(searchResultsGeometryStatus)="onSearchResultsGeometryStatusChange($event)"
[changeSearchCoordsFormatEnabled]="igoChangeSearchCoordsFormatEnabled"
(changeSearchCoordsFormatStatus)="onchangeCoordsFormatStatusChange($event)"
(search)="onSearch($event)"
(clearFeature)="onClearSearch()"
(searchSettingsChange)="onSearchSettingsChange()">
Expand Down
13 changes: 11 additions & 2 deletions src/app/pages/portal/portal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export class PortalComponent implements OnInit, OnDestroy {
private sidenavMediaAndOrientation$$: Subscription;

public igoSearchPointerSummaryEnabled: boolean;
public igoChangeSearchCoordsFormatEnabled: boolean;

public toastPanelForExpansionOpened = true;
private activeWidget$$: Subscription;
Expand Down Expand Up @@ -354,6 +355,8 @@ export class PortalComponent implements OnInit, OnDestroy {
if (this.igoSearchPointerSummaryEnabled === undefined) {
this.igoSearchPointerSummaryEnabled = this.storageService.get('searchPointerSummaryEnabled') as boolean || false;
}

this.igoChangeSearchCoordsFormatEnabled = this.storageService.get('changeSearchCoordsFormatEnabled') as boolean || false;
}

ngOnInit() {
Expand Down Expand Up @@ -789,6 +792,11 @@ export class PortalComponent implements OnInit, OnDestroy {
this.searchState.setSearchResultsGeometryStatus(value);
}

onchangeCoordsFormatStatusChange(value) {
this.storageService.set('changeSearchCoordsFormatEnabled', value);
this.igoChangeSearchCoordsFormatEnabled = value;
}

onSearchSettingsChange() {
this.onSettingsChange$.next(true);
}
Expand Down Expand Up @@ -946,7 +954,8 @@ export class PortalComponent implements OnInit, OnDestroy {
}

searchCoordinate(coord: [number, number]) {
this.searchBarTerm = coord.map((c) => c.toFixed(6)).join(', ');
this.searchBarTerm = (!this.igoChangeSearchCoordsFormatEnabled) ?
coord.map((c) => c.toFixed(6)).join(', ') : coord.reverse().map((c) => c.toFixed(6)).join(', ');
}

updateMapBrowserClass() {
Expand Down Expand Up @@ -1151,7 +1160,7 @@ export class PortalComponent implements OnInit, OnDestroy {

private readLanguageParam(params) {
if (params['lang']) {
this.authService.languageForce = true;
//this.authService.languageForce = true;
this.languageService.setLanguage(params['lang']);
}
}
Expand Down