Changed qralatlng to post
这个提交包含在:
父节点
3efcbf0b0d
当前提交
6b9ad004ad
共有 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,11 +811,17 @@ $("#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',
|
||||||
|
type: 'post',
|
||||||
|
data: {
|
||||||
|
qra: $(this).val(),
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
// Set Map to Lat/Long
|
// Set Map to Lat/Long
|
||||||
|
result = JSON.parse(data);
|
||||||
markers.clearLayers();
|
markers.clearLayers();
|
||||||
if (typeof result !== "undefined") {
|
if (typeof result[0] !== "undefined" && typeof result[1] !== "undefined") {
|
||||||
var redIcon = L.icon({
|
var redIcon = L.icon({
|
||||||
iconUrl: icon_dot_url,
|
iconUrl: icon_dot_url,
|
||||||
iconSize: [18, 18], // size of the icon
|
iconSize: [18, 18], // size of the icon
|
||||||
|
|
@ -825,9 +831,12 @@ $("#locator").keyup(function(){
|
||||||
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',
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用