Skip to content

Commit

Permalink
fix(caompare-landmark): share when name with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Dec 6, 2024
1 parent 247b4ea commit 062dd91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/my-account/my-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,12 @@ https://cartes-ign.ign.fr?lng=${landmark.geometry.coordinates[0]}&lat=${landmark
*/
shareCompareLandmark(compareLandmark) {
let props = compareLandmark.properties;
let url = encodeURI(`https://cartes-ign.ign.fr?lng=${compareLandmark.geometry.coordinates[0]}&lat=${compareLandmark.geometry.coordinates[1]}&z=${props.zoom}&l1=${props.layer1}&l2=${props.layer2}&m=${props.mode}&title=${props.accroche}&text=${props.text}&color=${props.color}`.replace(/ /g, "_"));
Share.share({
title: `${props.accroche}`,
text: `${props.accroche}
${props.text}`,
url: `https://cartes-ign.ign.fr?lng=${compareLandmark.geometry.coordinates[0]}&lat=${compareLandmark.geometry.coordinates[1]}&z=${props.zoom}&l1=${props.layer1}&l2=${props.layer2}&m=${props.mode}&title=${props.accroche}&text=${props.text}&color=${props.color}`,
url: url,
dialogTitle: "Partager mon point de repère Comparer",
});
}
Expand Down

0 comments on commit 062dd91

Please sign in to comment.