Skip to content

Commit

Permalink
fix(compare-landmark): share issues
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Jan 15, 2025
1 parent 67c48de commit aab9e11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ function app() {
Globals.position.compute({ lngLat: center }).then(() => {
Globals.menu.open("position");
});
if (Globals.searchResultMarker != null) {
Globals.searchResultMarker.remove();
Globals.searchResultMarker = null;
}
Globals.searchResultMarker = new maplibregl.Marker({element: Globals.searchResultIcon, anchor: "bottom"})
.setLngLat(center)
.addTo(map);
}
if (Globals.searchResultMarker != null) {
Globals.searchResultMarker.remove();
Globals.searchResultMarker = null;
}
Globals.searchResultMarker = new maplibregl.Marker({element: Globals.searchResultIcon, anchor: "bottom"})
.setLngLat(center)
.addTo(map);
map.once("moveend", () => {
StatusPopups.getNetworkPopup(map);
StatusPopups.getEditoPopup(map);
Expand Down
2 changes: 1 addition & 1 deletion src/js/my-account/my-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ 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, "%20"));
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, "%20");
Share.share({
title: `${props.accroche}`,
text: `${props.accroche}
Expand Down

0 comments on commit aab9e11

Please sign in to comment.