|
|
|
@ -107,6 +107,7 @@ function loadMapZones( SID ){ |
|
|
|
break; |
|
|
|
}; |
|
|
|
}; |
|
|
|
/* |
|
|
|
if( data.zones[i].dev_is_source ){ |
|
|
|
if( typeof pp !== 'undefined' ) { |
|
|
|
var sty = ''; |
|
|
|
@ -124,24 +125,22 @@ function loadMapZones( SID ){ |
|
|
|
html: '<div id="'+data.zones[i].dev_id+'_div" class="'+sty+'" onclick="clickDeviceSelector('+data.zones[i].dev_id+');"><img id="'+data.zones[i].dev_id+'_ind" width="16px" src="/style/assets/led_green_blink_300ms.gif"><center><img src="/style/assets/'+data.zones[i].dev_type+'_node.png"><br/><p class="dev_name">'+data.zones[i].dev_name+'</p></center></div>' |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
};*/ |
|
|
|
if( data.zones[i].zang != undefined ){ |
|
|
|
//L.polygon( data.zones[i].zang, {color: '#ffff00', weight: 1, opacity: 1.0, clickable: false, interactive: false, bubblingMouseEvents: false }).addTo(map);
|
|
|
|
ActiveZones.zang[i] = L.circle( data.zones[i].zang, {radius: 0.3, color: '#ffff00', weight: 1, opacity: 1.0, fillOpacity: 1.0 } );//.addTo( map );
|
|
|
|
}; |
|
|
|
if( data.zones[i].center != undefined ){ |
|
|
|
//L.polygon( data.zones[i].zmark, {color: '#ffff00', weight: 1, opacity: 1.0, clickable: false, interactive: false, bubblingMouseEvents: false }).addTo(map);
|
|
|
|
ActiveZones.center[i] = L.circle( data.zones[i].center, {radius: 0.3, color: '#ffff00', weight: 1, opacity: 1.0, fillOpacity: 1.0 } ).addTo( map ); |
|
|
|
ActiveZones.center[i] = L.circle( data.zones[i].center, {radius: 0.3, color: '#ffff00', weight: 1, opacity: 1.0, fillOpacity: 1.0 } );//.addTo( map );
|
|
|
|
}; |
|
|
|
}; |
|
|
|
if( selecredActiveSourceFilter == 0 ){ |
|
|
|
//if( selecredActiveSourceFilter == 0 ){
|
|
|
|
turnAllGzOn(); |
|
|
|
} else { |
|
|
|
turnOffAllGzButThis( selecredActiveSourceFilter ); |
|
|
|
}; |
|
|
|
if( typeof pp !== 'undefined' ) pp.doLayout(); |
|
|
|
//LoadMapEvents( SelectedSite );
|
|
|
|
//tlInterval = window.setInterval( LoadMapEvents, 333, SelectedSite );
|
|
|
|
//} else {
|
|
|
|
// turnOffAllGzButThis( selecredActiveSourceFilter );
|
|
|
|
//};
|
|
|
|
//if( typeof pp !== 'undefined' ) pp.doLayout();
|
|
|
|
}, |
|
|
|
failure: function( response, opts ) { |
|
|
|
//Ext.fly('some_div').update('Fail!');
|
|
|
|
@ -562,37 +561,37 @@ function loadLocationNodes(){ |
|
|
|
for( i=0; i < data.length; i++){ |
|
|
|
switch( data[i].type ){ |
|
|
|
case 1:{ |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: ALS_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: ALS_Icon, mycustomid:data[i].id } ).addTo( map_ed ).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 2:{ |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: LFS_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: LFS_Icon, mycustomid:data[i].id } ).addTo( map_ed ).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 3:{ |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLS200_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLS200_Icon, mycustomid:data[i].id } ).addTo( map_ed ).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 4:{ |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLS360_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLS360_Icon, mycustomid:data[i].id } ).addTo( map_ed ).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 5:{ |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: LRF3D_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: LRF3D_Icon, mycustomid:data[i].id } ).addTo( map_ed ).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 6:{ |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLSNET200_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PLSNET200_Icon, mycustomid:data[i].id } ).addTo( map_ed ).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 10: |
|
|
|
case 12:{ |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: FIXCAM_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: FIXCAM_Icon, mycustomid:data[i].id } ).addTo( map_ed ).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
break; |
|
|
|
}; |
|
|
|
case 11: |
|
|
|
case 13:{ |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PTZCAM_Icon, mycustomid:data[i].id } ).addTo(map).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
markers[i] = L.marker([data[i].lat, data[i].lon], {draggable: true,icon: PTZCAM_Icon, mycustomid:data[i].id } ).addTo( map_ed ).on('click', loadLoactionProps ).on('dblclick', markerDblClick ).on('dragend', updateLocation ); |
|
|
|
break; |
|
|
|
}; |
|
|
|
}; |
|
|
|
@ -600,14 +599,159 @@ function loadLocationNodes(){ |
|
|
|
}; |
|
|
|
}, |
|
|
|
failure: function( response, opts ) { |
|
|
|
var tPanel = Ext.getCmp('main_portal'); |
|
|
|
tPanel.remove(0); |
|
|
|
tPanel.add( { html: 'Failed to load dashboard!' } ); |
|
|
|
tPanel.doLayout(); |
|
|
|
//var tPanel = Ext.getCmp('main_portal');
|
|
|
|
//tPanel.remove(0);
|
|
|
|
//tPanel.add( { html: 'Failed to load dashboard!' } );
|
|
|
|
//tPanel.doLayout();
|
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function orientationEditor(){ |
|
|
|
if( orientationEditorWindow == null ){ |
|
|
|
orientationEditorWindow = new Ext.Window({ |
|
|
|
modal: true, |
|
|
|
title: 'Orientation', |
|
|
|
closeAction: 'hide', |
|
|
|
width: 640, |
|
|
|
height: 500, |
|
|
|
items:[{ |
|
|
|
layout: 'table', |
|
|
|
defaults: { |
|
|
|
bodyStyle:'padding:5px' |
|
|
|
}, |
|
|
|
layoutConfig: { |
|
|
|
columns: 3 |
|
|
|
}, |
|
|
|
items:[{ |
|
|
|
html: 'Roll:' |
|
|
|
},{ |
|
|
|
xtype: 'textfield', |
|
|
|
id: 'roll', |
|
|
|
name: 'roll', |
|
|
|
value: 30.0029, |
|
|
|
listeners:{ |
|
|
|
change: function( sl, nv, tt ){ |
|
|
|
setCubeOrientation( nv / 1.0, curY, curZ ); |
|
|
|
} |
|
|
|
} |
|
|
|
},{ |
|
|
|
xtype: 'slider', |
|
|
|
id: 'roll_sld', |
|
|
|
width: 200, |
|
|
|
value: 30.0029, |
|
|
|
minValue: -180.0, |
|
|
|
maxValue: 180.0, |
|
|
|
listeners:{ |
|
|
|
change: function( sl, nv, tt ){ |
|
|
|
setCubeOrientation( nv, curY, curZ ); |
|
|
|
} |
|
|
|
} |
|
|
|
},{ |
|
|
|
html: 'Pitch:' |
|
|
|
},{ |
|
|
|
xtype: 'textfield', |
|
|
|
id: 'pitch', |
|
|
|
name: 'pitch', |
|
|
|
value: 30.0029, |
|
|
|
listeners:{ |
|
|
|
change: function( sl, nv, tt ){ |
|
|
|
setCubeOrientation( curX, nv / 1.0, curZ ); |
|
|
|
} |
|
|
|
} |
|
|
|
},{ |
|
|
|
xtype: 'slider', |
|
|
|
id: 'pitch_sld', |
|
|
|
width: 200, |
|
|
|
value: 30.0029, |
|
|
|
minValue: -180.0, |
|
|
|
maxValue: 180.0, |
|
|
|
listeners:{ |
|
|
|
change: function( sl, nv, tt ){ |
|
|
|
setCubeOrientation( curX, nv, curZ ); |
|
|
|
} |
|
|
|
} |
|
|
|
},{ |
|
|
|
html: 'Yaw:' |
|
|
|
},{ |
|
|
|
xtype: 'textfield', |
|
|
|
id: 'yaw', |
|
|
|
name: 'yaw', |
|
|
|
value: 30.0029, |
|
|
|
listeners:{ |
|
|
|
change: function( sl, nv, tt ){ |
|
|
|
//alert( nv );
|
|
|
|
setCubeOrientation( curX, curY, nv / 1.0 ); |
|
|
|
} |
|
|
|
} |
|
|
|
},{ |
|
|
|
xtype: 'slider', |
|
|
|
id: 'yaw_sld', |
|
|
|
width: 200, |
|
|
|
value: 30.0029, |
|
|
|
minValue: -180.0, |
|
|
|
maxValue: 180.0, |
|
|
|
listeners:{ |
|
|
|
change: function( sl, nv, tt ){ |
|
|
|
setCubeOrientation( curX, curY, nv ); |
|
|
|
} |
|
|
|
} |
|
|
|
}] |
|
|
|
},{ |
|
|
|
html: '<div id="wrapper"><div class="viewport"><div class="cube"><div class="side"><div class="cube-image top">FRONT</div></div><div class="side"><div class="cube-image">TOP</div></div><div class="side"><div class="cube-image">RIGHT</div></div><div class="side"><div class="cube-image">BOTTOM</div></div><div class="side"><div class="cube-image">LEFT</div></div><div class="side"><div class="cube-image active">BACK</div></div></div></div></div>' |
|
|
|
}], |
|
|
|
buttons:[{ |
|
|
|
text: 'Cancel', |
|
|
|
width: 200, |
|
|
|
handler: function(){ |
|
|
|
orientationEditorWindow.hide(); |
|
|
|
} |
|
|
|
},{ |
|
|
|
text: 'Apply', |
|
|
|
width: 200, |
|
|
|
handler: function(){ |
|
|
|
Ext.getCmp('sroll').setValue( Ext.getCmp('roll').getValue() ); |
|
|
|
Ext.getCmp('spitch').setValue( Ext.getCmp('pitch').getValue() ); |
|
|
|
Ext.getCmp('syaw').setValue( Ext.getCmp('yaw').getValue() ); |
|
|
|
orientationEditorWindow.hide(); |
|
|
|
} |
|
|
|
}] |
|
|
|
}); |
|
|
|
|
|
|
|
orientationEditorWindow.show(); |
|
|
|
|
|
|
|
cubeViewport = new Viewport({ |
|
|
|
element: document.getElementsByClassName('cube')[0], |
|
|
|
fps: 20, |
|
|
|
sensivity: .1, |
|
|
|
sensivityFade: .93, |
|
|
|
speed: 2, |
|
|
|
touchSensivity: 1.5 |
|
|
|
}); |
|
|
|
|
|
|
|
cube = new Cube({ |
|
|
|
viewport: cubeViewport, |
|
|
|
element: document.getElementsByClassName('cube')[0] |
|
|
|
}); |
|
|
|
} else { |
|
|
|
orientationEditorWindow.show(); |
|
|
|
}; |
|
|
|
setCubeOrientation( Ext.getCmp('sroll').getValue(), Ext.getCmp('spitch').getValue(), Ext.getCmp('syaw').getValue() ); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var locationSelectedNode = 0; |
|
|
|
function loadLoactionProps( e ){ |
|
|
|
if( typeof e == 'number' ){ |
|
|
|
locationSelectedNode = e; |
|
|
|
} else { |
|
|
|
locationSelectedNode = e.sourceTarget.options.mycustomid; |
|
|
|
} |
|
|
|
loadNodeLocationProps( locationSelectedNode ); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function loadNodeLocationProps( NodeID ){ |
|
|
|
//alert( 'Node: ' + NodeID );
|
|
|
|
Ext.Ajax.request({ |
|
|
|
@ -674,7 +818,11 @@ function loadLocationEditor( el_id , node_type, node_id, lat, lon ){ |
|
|
|
maxZoom: 17,*/ |
|
|
|
keyboard: false |
|
|
|
}).setView([SiteLat, SiteLon], 17); |
|
|
|
L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon, zIndexOffset: 1000 } ).addTo(map_ed)/*.on('click', LoadNodesList )*/.bindPopup("<b><?=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?></b>");//.openPopup();
|
|
|
|
if( node_type ){ |
|
|
|
L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon, zIndexOffset: 1000 } ).addTo(map_ed).bindPopup("<b><?=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?></b>");//.openPopup();
|
|
|
|
} else { |
|
|
|
L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon, zIndexOffset: 1000 } ).addTo(map_ed).on('click', LoadNodesList ).bindPopup("<b><?=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?></b>");//.openPopup();
|
|
|
|
}; |
|
|
|
var mapLayers = []; |
|
|
|
|
|
|
|
mapLayers["MyMap"] = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
|
|
|
@ -707,21 +855,6 @@ function loadLocationEditor( el_id , node_type, node_id, lat, lon ){ |
|
|
|
attribution: 'Kartendaten: © <a href="https://openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>-Mitwirkende, SRTM | Kartendarstellung: © <a href="http://opentopomap.org/" target="_blank">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">CC-BY-SA</a>) ', |
|
|
|
maxZoom: 19 |
|
|
|
}); |
|
|
|
/* |
|
|
|
mapLayers["Cycle"] = L.tileLayer('https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], { |
|
|
|
attribution: 'Maps © <a href="https://www.thunderforest.com" target="_blank">Thunderforest</a>, Data © <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap contributors</a>', |
|
|
|
maxZoom: 22 |
|
|
|
}); |
|
|
|
mapLayers["Landscape"] = L.tileLayer('https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], { |
|
|
|
attribution: 'Maps © <a href="https://www.thunderforest.com" target="_blank">Thunderforest</a>, Data © <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap contributors</a>', |
|
|
|
maxZoom: 22 |
|
|
|
}); |
|
|
|
mapLayers["Outdoor"] = L.tileLayer('https://tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=' + _PHP['API_KEY_THUNDERFOREST_1'], { |
|
|
|
attribution: 'Maps © <a href="https://www.thunderforest.com" target="_blank">Thunderforest</a>, Data © <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap contributors</a>', |
|
|
|
maxZoom: 22 |
|
|
|
}); |
|
|
|
*/ |
|
|
|
|
|
|
|
var baseMaps = { |
|
|
|
"MyMap": mapLayers["MyMap"], |
|
|
|
"OpenStreetMap": mapLayers["OpenStreetMap"], |
|
|
|
@ -777,6 +910,151 @@ function loadLocationEditor( el_id , node_type, node_id, lat, lon ){ |
|
|
|
break; |
|
|
|
}; |
|
|
|
}; |
|
|
|
} else loadLocationNodes(); |
|
|
|
}; |
|
|
|
|
|
|
|
function updateSiteAnchor(){ |
|
|
|
SiteLat = Ext.getCmp('siteLat').getValue(); |
|
|
|
SiteLon = Ext.getCmp('siteLon').getValue(); |
|
|
|
SiteAlt = Ext.getCmp('siteAlt').getValue(); |
|
|
|
Ext.Ajax.request({ |
|
|
|
url: '/lib/controller/updateLocation.php', |
|
|
|
params: { |
|
|
|
SITE: <?=$SiteID;?>, |
|
|
|
UID: <?=$UserID;?>, |
|
|
|
TYPE: 1, |
|
|
|
SID: '<?=$Session;?>', |
|
|
|
LAT: SiteLat, |
|
|
|
LON: SiteLon, |
|
|
|
ALT: SiteAlt |
|
|
|
}, |
|
|
|
failure: failureAJAXFunction |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
function updateLocationOrientation(){ |
|
|
|
var tLat = Ext.getCmp('slat').getValue(); |
|
|
|
var tLon = Ext.getCmp('slon').getValue(); |
|
|
|
var tAlt = Ext.getCmp('salt').getValue(); |
|
|
|
var tRoll = Ext.getCmp('sroll').getValue(); |
|
|
|
var tPitch = Ext.getCmp('spitch').getValue(); |
|
|
|
var tYaw = Ext.getCmp('syaw').getValue(); |
|
|
|
Ext.Ajax.request({ |
|
|
|
url: '/lib/controller/updateLocation.php', |
|
|
|
params: { |
|
|
|
NODE: locationSelectedNode, |
|
|
|
UID: <?=$UserID;?>, |
|
|
|
TYPE: 2, |
|
|
|
SID: '<?=$Session;?>', |
|
|
|
LAT: tLat, |
|
|
|
LON: tLon, |
|
|
|
ALT: tAlt, |
|
|
|
YAW: tYaw, |
|
|
|
ROLL: tRoll, |
|
|
|
PITCH: tPitch |
|
|
|
}, |
|
|
|
failure: failureAJAXFunction |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
var iconSaver = null; |
|
|
|
var markerSaver = null; |
|
|
|
|
|
|
|
function updateLocation( e ){ |
|
|
|
locationSelectedNode = e.target.options.mycustomid; |
|
|
|
Ext.Ajax.request({ |
|
|
|
url: '/lib/controller/updateLocation.php', |
|
|
|
params: { |
|
|
|
NODE: locationSelectedNode, |
|
|
|
SITE: <?=$SiteID;?>, |
|
|
|
UID: <?=$UserID;?>, |
|
|
|
TYPE: 0, |
|
|
|
SID: '<?=$Session;?>', |
|
|
|
LAT: e.target._latlng.lat, |
|
|
|
LON: e.target._latlng.lng |
|
|
|
}, |
|
|
|
success: function( response, opts ){ |
|
|
|
loadNodeLocationProps( locationSelectedNode ); |
|
|
|
}, |
|
|
|
failure: failureAJAXFunction |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
function markerDblClick( e ){ |
|
|
|
if( iconSaver == null ){ |
|
|
|
iconSaver = e.target.options.icon; |
|
|
|
markerSaver = e.target; |
|
|
|
e.target.setIcon( SNAPE_Icon ); |
|
|
|
for( i=0; i< markers.length; i++){ |
|
|
|
if( markers[i].options.mycustomid != e.target.options.mycustomid ){ |
|
|
|
markers[i].setOpacity( 0.1 ); |
|
|
|
} else { |
|
|
|
markers[i].setOpacity( 1.0 ); |
|
|
|
} |
|
|
|
}; |
|
|
|
} else { |
|
|
|
if( e.target.options.mycustomid == markerSaver.options.mycustomid ){ |
|
|
|
e.target.setIcon( iconSaver ); |
|
|
|
iconSaver = null; |
|
|
|
markerSaver = null; |
|
|
|
for( i=0; i< markers.length; i++){ |
|
|
|
markers[i].setOpacity( 1.0 ); |
|
|
|
}; |
|
|
|
} else { |
|
|
|
markerSaver.setIcon( iconSaver ); |
|
|
|
iconSaver = e.target.options.icon; |
|
|
|
markerSaver = e.target; |
|
|
|
e.target.setIcon( SNAPE_Icon ); |
|
|
|
for( i=0; i< markers.length; i++){ |
|
|
|
if( markers[i].options.mycustomid != e.target.options.mycustomid ){ |
|
|
|
markers[i].setOpacity( 0.1 ); |
|
|
|
} else { |
|
|
|
markers[i].setOpacity( 1.0 ); |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
//loadLocationNodes();
|
|
|
|
}; |
|
|
|
|
|
|
|
function setNodeLocationToAnchor(){ |
|
|
|
Ext.Ajax.request({ |
|
|
|
url: '/lib/controller/updateLocation.php', |
|
|
|
params: { |
|
|
|
NODE: locationSelectedNode, |
|
|
|
SITE: <?=$SiteID;?>, |
|
|
|
UID: <?=$UserID;?>, |
|
|
|
TYPE: 0, |
|
|
|
SID: '<?=$Session;?>', |
|
|
|
LAT: SiteLat, |
|
|
|
LON: SiteLon, |
|
|
|
ALT: SiteAlt |
|
|
|
}, |
|
|
|
success: function( response, opts ){ |
|
|
|
loadLocationEditor(); |
|
|
|
}, |
|
|
|
failure: failureAJAXFunction |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
function setNodeLocationByDelta(){ |
|
|
|
var dx = Ext.getCmp('dx').getValue(); |
|
|
|
var dy = Ext.getCmp('dy').getValue(); |
|
|
|
var dz = Ext.getCmp('dz').getValue(); |
|
|
|
Ext.Ajax.request({ |
|
|
|
url: '/lib/controller/updateLocation.php', |
|
|
|
params: { |
|
|
|
NODE: locationSelectedNode, |
|
|
|
SITE: <?=$SiteID;?>, |
|
|
|
UID: <?=$UserID;?>, |
|
|
|
TYPE: 3, |
|
|
|
SID: '<?=$Session;?>', |
|
|
|
LAT: dx, |
|
|
|
LON: dy, |
|
|
|
ALT: dz |
|
|
|
}, |
|
|
|
success: function( response, opts ){ |
|
|
|
loadLocationEditor(); |
|
|
|
}, |
|
|
|
failure: failureAJAXFunction |
|
|
|
}); |
|
|
|
}; |