Skip to content

Commit

Permalink
Merge pull request #2994 from Geoportail-Luxembourg/fix_divers
Browse files Browse the repository at this point in the history
Show cyclomedia link to MinTour role
  • Loading branch information
rmichaelis authored Jan 17, 2023
2 parents bc3b35b + 73d2735 commit 8fbf6ce
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,14 @@ exports.prototype.getUserType = function() {
return this.typeUtilisateur;
};

/**
* @return {string|undefined} The Role.
*/
exports.prototype.getRole = function() {
return this.role;
};


/**
* @return {?number} The Role Id.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,18 +324,22 @@ const exports = function(


if (x !== undefined && y !== undefined) {
var coordinate = version === 3 ?
/** @type {ol.Coordinate} */ (transform([parseFloat(x), parseFloat(y)], srs,
this['map'].getView().getProjection())) :
/** @type {ol.Coordinate} */ (transform([parseFloat(y), parseFloat(x)], srs,
this['map'].getView().getProjection()));
this.setClickCordinate_(coordinate);
this.loadInfoPane_();
if (!this.appGetDevice_.testEnv('xs')) {
this['open'] = true;
this['hiddenContent'] = false;
} else {
this['hiddenContent'] = true;
try {
var coordinate = version === 3 ?
/** @type {ol.Coordinate} */ (transform([parseFloat(x), parseFloat(y)], srs,
this['map'].getView().getProjection())) :
/** @type {ol.Coordinate} */ (transform([parseFloat(y), parseFloat(x)], srs,
this['map'].getView().getProjection()));
this.setClickCordinate_(coordinate);
this.loadInfoPane_();
if (!this.appGetDevice_.testEnv('xs')) {
this['open'] = true;
this['hiddenContent'] = false;
} else {
this['hiddenContent'] = true;
}
} catch(exception) {
console.error(exception);
}
}
}
Expand Down Expand Up @@ -557,7 +561,8 @@ exports.prototype.getLidarUrl = function() {
*/
exports.prototype.isCyclomediaAvailable = function() {
if (this.appUserManager_.getUserType() == 'etat' ||
this.appUserManager_.getUserType() == 'commune') {
this.appUserManager_.getUserType() == 'commune' ||
this.appUserManager_.getRole() == 'MinTour') {
return true;
}
return false;
Expand Down

0 comments on commit 8fbf6ce

Please sign in to comment.