Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ICT4iCity
data_workflow
Commits
2d5c942d
Commit
2d5c942d
authored
Apr 12, 2022
by
JOE XMG
Browse files
update
parent
b06838ab
Pipeline
#6180
passed with stage
in 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/bbox-finder.html
View file @
2d5c942d
...
...
@@ -183,7 +183,7 @@
<span id="conversion_result"></span>
`
;
console
.
log
(
`WFS Request (31463): http://193.196.137.147:8080/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=bldg:Building&bbox=
${
p_dest_min
.
x
.
toFixed
(
4
)}
,
${
p_dest_min
.
y
.
toFixed
(
4
)}
,
${
p_dest_max
.
x
.
toFixed
(
4
)}
,
${
p_dest_max
.
y
.
toFixed
(
4
)}
&srsName=EPSG:31463`
)
});
map
.
on
(
L
.
Draw
.
Event
.
EDITED
,
function
(
e
)
{
...
...
@@ -211,12 +211,12 @@
}
function
convert_epsg
()
{
var
input_epsg
=
$
(
"
#input_epsg
"
).
val
()
var
input_epsg
=
$
(
"
#input_epsg
"
).
val
()
var
bbox_latlng
=
`
${
tmp_layer
.
_bounds
.
_southWest
.
lng
}
,
${
tmp_layer
.
_bounds
.
_southWest
.
lat
}
;
${
tmp_layer
.
_bounds
.
_northEast
.
lng
}
,
${
tmp_layer
.
_bounds
.
_northEast
.
lat
}
`
var
conversion_service
=
`https://epsg.io/trans?data=
${
bbox_latlng
}
&s_srs=4326&t_srs=
${
input_epsg
}
`
console
.
log
(
`request to
${
conversion_service
}
...`
)
//
console.log(`request to ${conversion_service}...`)
$
.
getJSON
(
conversion_service
,
function
(
data
)
{
if
(
data
.
status
)
{
$
(
"
#conversion_result
"
).
html
(
"
ESPG Code not support or invalid EPSG Code.
"
)
...
...
@@ -224,11 +224,11 @@
var
result
=
`
<br>
BBOX (
${
input_epsg
}
):
<input type="text" value="
${
parseFloat
(
data
[
0
][
"
x
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
0
][
"
y
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
1
][
"
x
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
1
][
"
y
"
]).
toFixed
(
4
)}
" id="
${
input_epsg
}
" size="60">
<input type="text" value="
${
parseFloat
(
data
[
0
][
"
x
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
0
][
"
y
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
1
][
"
x
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
1
][
"
y
"
]).
toFixed
(
4
)}
" id="
${
input_epsg
}
" size="60">
<button class="badge bg-secondary" onclick="clickToCopy('31463')">click to copy</button>
`
$
(
"
#conversion_result
"
).
html
(
result
)
console
.
log
(
`WFS Request (
${
input_epsg
}
): http://193.196.137.147:8080/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=bldg:Building&bbox=
${
parseFloat
(
data
[
0
][
"
x
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
0
][
"
y
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
1
][
"
x
"
]).
toFixed
(
4
)}
,
${
parseFloat
(
data
[
1
][
"
y
"
]).
toFixed
(
4
)}
&srsName=EPSG:
${
input_epsg
}
`
)
}
});
}
...
...
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