Skip to content

Commit

Permalink
Fix point component display
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt committed Nov 21, 2024
1 parent 5ef6eb8 commit 058407d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/client/src/components/map/pointComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class PointComponent extends React.Component {
this.changefeature = this.updatePointAndGetAddress.bind(this);
this.detailMapStyleFunction = detailMapStyleFunction.bind(this);
this.getAddress = this.getAddress.bind(this);
this.setStateBound = this.setState.bind(this);
this.srs = "EPSG:2056";

_.forEach(projections, function (proj, srs) {
Expand Down Expand Up @@ -302,18 +301,14 @@ class PointComponent extends React.Component {
style={{
position: "relative",
padding: 0,
height: "100%",
display: "flex",
flexDirection: "column",
}}>
<div
className="stbg"
id="point"
style={{
padding: "0px",
flex: "1 1 100%",
height: "100%",
minHeight: 380,
height: 380,
}}
/>
<MapControls onZoomIn={this.onZoomIn} onZoomOut={this.onZoomOut} onFitToExtent={this.onFitToExtent} />
Expand All @@ -338,7 +333,10 @@ class PointComponent extends React.Component {
<Label color="black">
<Icon name="map marker" />
{_.isArray(this.state.point)
? "E" + this.state.point[0].toFixed(2) + " N" + this.state.point[1].toFixed(2)
? "E" +
_.round(this.state.point[0], 2).toLocaleString() +
" N" +
_.round(this.state.point[1], 2).toLocaleString()
: "n/p"}
<Label.Detail>{this.srs}</Label.Detail>
</Label>
Expand Down

0 comments on commit 058407d

Please sign in to comment.