+LAT_CENTRE
This commit is contained in:
@ -1712,6 +1712,98 @@ function callFrmLocustDelData()
|
||||
setTimeout(function() { g_WinLegend0.setLeftTop(window.innerWidth-g_WinLegend0.getWidth()-20,40); }, 1000);
|
||||
}
|
||||
|
||||
//Call data for create markers
|
||||
function callFrmCheckpoints(){
|
||||
let input; let value;
|
||||
|
||||
let rData = {
|
||||
country_id: null
|
||||
};
|
||||
value = $('#filter_checkpoint_country_id').val();
|
||||
if(value!='') rData.country_id = parseInt(value);
|
||||
|
||||
$.ajax({
|
||||
url: '../get_checkpoints',
|
||||
data: JSON.stringify(rData),
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
success: function(data,status){
|
||||
if(status=='success')
|
||||
{
|
||||
if(data.errorCode=='0')
|
||||
{
|
||||
//updatePOILocustDel(data.data);
|
||||
}else
|
||||
{
|
||||
alert2(trt('Error'),data.errorMessage);
|
||||
}
|
||||
}else{
|
||||
alert2(trt('Alert'),status);
|
||||
}
|
||||
hideProgressBar('FrmCheckpointData');
|
||||
},
|
||||
error: function(jqXHR, exception) {
|
||||
alert2(trt('Alert'),jqXHR.responseText);
|
||||
hideProgressBar('FrmCheckpointData');
|
||||
}
|
||||
});
|
||||
showProgressBar("FrmCheckpointData");
|
||||
|
||||
//Show legend
|
||||
/*if(typeof g_WinLegend0 == "undefined" || g_WinLegend0==null || g_WinLegend0.closed)
|
||||
{
|
||||
g_WinLegend0=new TWin();
|
||||
g_WinLegend0.BuildGUI(window.innerWidth-150,40);
|
||||
}
|
||||
g_WinLegend0.setCaption(trt('Legend'));
|
||||
g_WinLegend0.setSize("145px","65px");
|
||||
g_WinLegend0.setContent('<table border="0" style="white-space:nowrap;"><tr><td><img src="../resources/engine/images/icons/flag.png" alt=""></td><td style="padding-left:10px;">'+trt('Spraying')+'</td></tr></table>');
|
||||
g_WinLegend0.hide(false);
|
||||
g_WinLegend0.setLeftTop(window.innerWidth-g_WinLegend0.getWidth()-20,40);
|
||||
setTimeout(function() { g_WinLegend0.setLeftTop(window.innerWidth-g_WinLegend0.getWidth()-20,40); }, 1000);*/
|
||||
}
|
||||
|
||||
function openFrmCheckpoints(){
|
||||
var input;
|
||||
|
||||
var country_id="";
|
||||
|
||||
input = document.getElementById('filter_checkpoint_country_id');
|
||||
if(input!=null) country_id=input.value;
|
||||
|
||||
g_FrmCheckpoints = new SRec();
|
||||
g_FrmCheckpoints.create(null);
|
||||
g_FrmCheckpoints.f_TypeName="FrmCheckpoints";
|
||||
|
||||
g_FrmCheckpoints.f_Settings='\
|
||||
<metadata><type n="FrmCheckpoints">\n\
|
||||
<properties>\n\
|
||||
<prop n="country_id">\n\
|
||||
<![CDATA['+country_id+']]>\n\
|
||||
<type n="Countries">\n\
|
||||
<objects-list>\n\
|
||||
<filter><column n="id"><![CDATA['+country_id+']]></column></filter>\n\
|
||||
</objects-list>\n\
|
||||
</type>\n\
|
||||
</prop>\n\
|
||||
</properties>\n\
|
||||
<objects-list>\n\
|
||||
<filter height="1">\n\
|
||||
<column n="id"><![CDATA[]]></column>\n\
|
||||
<column n="country_id"><![CDATA['+country_id+']]></column>\n\
|
||||
</filter>\n\
|
||||
</objects-list>\n\
|
||||
</type></metadata>\n\
|
||||
';
|
||||
|
||||
//g_FrmCheckpoints.win.setSize("400px","100px");
|
||||
g_FrmCheckpoints.win.setHeight(500);
|
||||
//g_FrmCheckpoints.win.setLeftTop(300,40);
|
||||
g_FrmCheckpoints.win.setCenter();
|
||||
g_FrmCheckpoints.request.callServer(ScriptName,'<metadata fn="0"><type n="FrmCheckpoints"></type></metadata>');
|
||||
}
|
||||
|
||||
function openFrmLocustInfo()
|
||||
{
|
||||
var input;
|
||||
|
||||
Reference in New Issue
Block a user