Commit 2d5c942d authored by JOE XMG's avatar JOE XMG
Browse files

update

parent b06838ab
Pipeline #6180 passed with stage
in 5 seconds
......@@ -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}`)
}
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment