Changed qralatlng to post

这个提交包含在:
phl0 2023-08-28 15:21:56 +02:00
父节点 3efcbf0b0d
当前提交 6b9ad004ad
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A
共有 2 个文件被更改,包括 28 次插入17 次删除

查看文件

@ -1012,7 +1012,9 @@ class Logbook extends CI_Controller {
return $latlng; return $latlng;
} }
function qralatlngjson($qra) { function qralatlngjson() {
$qra = xss_clean($this->input->post('qra'));
log_message('debug','TEST QRA '.$qra);
$this->load->library('Qra'); $this->load->library('Qra');
$latlng = $this->qra->qra2latlong($qra); $latlng = $this->qra->qra2latlong($qra);
print json_encode($latlng); print json_encode($latlng);

查看文件

@ -811,23 +811,32 @@ $("#locator").keyup(function(){
} }
if(qra_input.length >= 4 && $(this).val().length > 0) { if(qra_input.length >= 4 && $(this).val().length > 0) {
$.getJSON(base_url + 'index.php/logbook/qralatlngjson/' + $(this).val(), function(result) $.ajax({
{ url: base_url + 'index.php/logbook/qralatlngjson',
// Set Map to Lat/Long type: 'post',
markers.clearLayers(); data: {
if (typeof result !== "undefined") { qra: $(this).val(),
var redIcon = L.icon({ },
iconUrl: icon_dot_url, success: function(data) {
iconSize: [18, 18], // size of the icon // Set Map to Lat/Long
}); result = JSON.parse(data);
markers.clearLayers();
if (typeof result[0] !== "undefined" && typeof result[1] !== "undefined") {
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [18, 18], // size of the icon
});
var marker = L.marker([result[0], result[1]], {icon: redIcon}); var marker = L.marker([result[0], result[1]], {icon: redIcon});
mymap.setZoom(8); mymap.setZoom(8);
mymap.panTo([result[0], result[1]]); mymap.panTo([result[0], result[1]]);
mymap.setView([result[0], result[1]], 8); mymap.setView([result[0], result[1]], 8);
} markers.addLayer(marker).addTo(mymap);
markers.addLayer(marker).addTo(mymap); }
}) },
error: function() {
},
});
$.ajax({ $.ajax({
url: base_url + 'index.php/logbook/searchbearing', url: base_url + 'index.php/logbook/searchbearing',