Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
2d587b01
Commit
2d587b01
authored
Oct 20, 2022
by
Eric Duminil
Browse files
No nanometer precision for coordinates anymore.
parent
540e20e2
Pipeline
#7208
passed with stage
in 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
2d587b01
...
...
@@ -398,7 +398,8 @@ const regionChooser = (function(){
var
geom
=
sketch
.
getGeometry
().
clone
().
transform
(
sourceProj
,
'
EPSG:4326
'
);
var
wgs84Coords
=
geom
.
getLinearRing
(
0
).
getCoordinates
();
var
wktPolygon
=
"
POLYGON((
"
;
wktPolygon
+=
wgs84Coords
.
map
(
lonLat
=>
lonLat
.
join
(
"
"
)).
join
(
"
,
"
);
var
precision
=
6
;
// ~ 10 cm precision
wktPolygon
+=
wgs84Coords
.
map
(([
lon
,
lat
])
=>
lon
.
toFixed
(
precision
)
+
"
"
+
lat
.
toFixed
(
precision
)).
join
(
"
,
"
);
utils
.
copyToClipboard
(
wktPolygon
+
"
))
"
,
dataPanel
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment