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

feat(portal): initialextent button prise2 #709

Closed
wants to merge 1 commit 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
1 change: 1 addition & 0 deletions src/app/pages/portal/portal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
[@controlsOffsetY]="getControlsOffsetY()"
[@mobileOffsetY]="getToastPanelStatus()">
</igo-offline-button>
<igo-initial-button [map]="map" color="primary" ></igo-initial-button>
<igo-geolocate-button
*ngIf="hasGeolocateButton"
[map]="map" color="primary"
Expand Down
5 changes: 4 additions & 1 deletion src/app/pages/portal/portal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export class PortalComponent implements OnInit, OnDestroy {
mapBrowser: ElementRef;
@ViewChild('searchBar', { read: ElementRef, static: true })
searchBar: ElementRef;
setInitialButton: any;

get map(): IgoMap {
return this.mapState.map;
Expand Down Expand Up @@ -316,7 +317,9 @@ export class PortalComponent implements OnInit, OnDestroy {
this.hasExpansionPanel = this.configService.getConfig('hasExpansionPanel');
this.hasGeolocateButton =
this.configService.getConfig('hasGeolocateButton') === undefined ? true : this.configService.getConfig('hasGeolocateButton');
this.showRotationButtonIfNoRotation =
this.setInitialButton =
 this.configService.getConfig('setInitialButton') === undefined ? true : this.configService.getConfig('setInitialButton') ;
this.showRotationButtonIfNoRotation =
this.configService.getConfig('showRotationButtonIfNoRotation') === undefined ?
false :
this.configService.getConfig('showRotationButtonIfNoRotation');
Expand Down
5 changes: 5 additions & 0 deletions src/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
},
"theme": "blue-theme",
"hasExpansionPanel": true,
"setInitialButton": {
 "initExtent":[-9000000, 5790000,-7500000, 6770000],
 "initCenter": [-73.938087, 49.000000],
 "initZoom" : 6
},
"hasGeolocateButton": true,
"showRotationButtonIfNoRotation": false,
"hasFeatureEmphasisOnSelection": true,
Expand Down
6 changes: 6 additions & 0 deletions src/config/interactiveTour.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@
"action": "click"
}
},
{
"element": "igo-initial-button",
      "title": "interactiveTour.global.initial-title",
      "text": "interactiveTour.global.initial",
      "noBackButton": true
    },
{
"element": "igo-geolocate-button",
"title": "interactiveTour.global.geolocate-title",
Expand Down
2 changes: 1 addition & 1 deletion src/contexts/_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"map": {
"view": {
"projection": "EPSG:3857",
"center": [-71.938087, 48.446975],
"center": [-73.938087, 49.000000],
"zoom": 6,
"maxZoom": 19,
"maxZoomOnExtent": 17
Expand Down
2 changes: 2 additions & 0 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"home-button": "This button allow to get back to main menu",
"geolocate-title": "GEOLOCATE",
"geolocate": "To zoom the map to your location.",
"initial-title": "INITIAL EXTENT",
"initial": "To return to the initial extent of the map",
"user-title": "USER",
"user-button": "To authenticate you or to disconnect and stay anonymous.",
"baselayers-title": "BASELAYERS",
Expand Down
1 change: 1 addition & 0 deletions src/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"tool-enter": "...son contenu s'affichera ici.",
"home-button": "Ce bouton nous permet ensuite le retour au menu principal.",
"geolocate-title": "GEOLOCALISATION",
"initial": "Pour retourner à l'étendue initiale de la carte",
"geolocate": "Pour zoomer la carte sur votre position.",
"user-title": "UTILISATEUR",
"user-button": "Pour vous authentifier à IGO2 ou vous déconnecter et demeurer anonyme.",
Expand Down