Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
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
Showing
1 changed file
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+2
-1
...stadt/regionchooser/website/script/simstadt_openlayers.js
with
2 additions
and
1 deletion
+2
-1
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
+
2
-
1
View file @
2d587b01
...
@@ -398,7 +398,8 @@ const regionChooser = (function(){
...
@@ -398,7 +398,8 @@ const regionChooser = (function(){
var
geom
=
sketch
.
getGeometry
().
clone
().
transform
(
sourceProj
,
'
EPSG:4326
'
);
var
geom
=
sketch
.
getGeometry
().
clone
().
transform
(
sourceProj
,
'
EPSG:4326
'
);
var
wgs84Coords
=
geom
.
getLinearRing
(
0
).
getCoordinates
();
var
wgs84Coords
=
geom
.
getLinearRing
(
0
).
getCoordinates
();
var
wktPolygon
=
"
POLYGON((
"
;
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
);
utils
.
copyToClipboard
(
wktPolygon
+
"
))
"
,
dataPanel
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets