Skip to content

Commit

Permalink
Merge pull request #203 from swisstopo/fix/studies-missing-from-map
Browse files Browse the repository at this point in the history
Fix: Studies missing from map
  • Loading branch information
TIL-EBP authored Jul 9, 2024
2 parents 22e5282 + 1efdae5 commit c79d000
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libs/asset-viewer/src/lib/services/all-study.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AllStudyService {
studyId: `study_${id}`,
assetId: parseInt(assetId),
isPoint: Boolean(isPoint),
centroid: { x: parseInt(x), y: parseInt(y) } as LV95,
centroid: { x: parseFloat(x), y: parseFloat(y) } as LV95,
} as AllStudyDTO;
}),
toArray(),
Expand Down
6 changes: 3 additions & 3 deletions libs/shared/src/lib/models/lv95.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export const lv95RoundedToMillimeter = (lv95: LV95): LV95 => ({
});

export const parseLV95 = (value: string, { separator }: { separator: string }): LV95 => {
const [x, y] = value.split(separator, 2);
const [y, x] = value.split(separator, 2);
return {
x: parseInt(x) as LV95X,
y: parseInt(y) as LV95Y,
x: parseFloat(x) as LV95X,
y: parseFloat(y) as LV95Y,
};
};

0 comments on commit c79d000

Please sign in to comment.