www.smartsecsystems.com<\/a>","_SSL_VALID_BUT_":"The Certificate is Valid. However:","_STATIC_CONNECTION_":"Static Connection","_STATUS_":"Status","_STORE_DAYS_":"Keep Report History Days","_STORE_EMPTY_SPACE_":"Preserve Empty Space on System","_STREAMS_":"Streams","_STUDY_BACKGROUND_":"Study Background","_SUCCESS_":"Success","_SWU_DASHBOARD_":"Software Update Management","_SYS_ANCHORT_LBL_":"System Anchor","_SYS_DASHBOARD_":"System Overview","_SYS_GENERAL_":"General","_SYS_MAP_":"System Map","_SYS_SETTINGS_":"System Settings","_TARGET_FILTERS_":"Filters","_TARGETING_TAB_":"Alarm Settings","_TCP_CLIENT_":"TCP Client","_TCP_SERVER_":"TCP Server","_TILE_URL_MAP_":"Tiles URL Pattern","_TIME_":"Time","_TOOLBOX_":"Toolbox","_TOP_PIC_BOUND_":"Top Picture Boundary (pixels)","_TYPE_":"Type","_UART_PORT_":"UART Port","_UDP_CLIENT_":"UDP Client","_UDP_SERVER_":"UDP Server","_UNLOCK_USER_":"Unlock User","_UPDATE_LBL_":"Update","_UPDATING_DATA_":"Updating Data","_UPGRADE_MNGMNT_":"Upgrade\/Backup","_UPLO_DONE_":"Already Uploaded","_UPLO_IN_PROGRESS_":"Uploading","_UPLOA2MODULE_":"Upload to Module","_UPLOAD_PACKAGE_":"Upload Package","_UPPER_SENSOR_":"Upper Sensor","_USER_":"User","_USER_LOGIN_":"User Login","_USERS_MNGMT_":"Users Management","_VERSION_":"Version","_VIDEO_ENCODER_":"Video","_VIDEO_FILE_HAS_DOWNLOADED_":"Video File has been Downloaded","_WDEV_DET_WIZ0_":"Device Type","_WDEV_DET_WIZ1_":"Instalation Type","_WDEV_DET_WIZ2_":"Environment","_WDEV_DET_WIZ3_":"Something Else","_WDEV_DET_WIZT_":"Sensor Setup Detection Wizard","_WDEV_MISTMATCH_":"Device Is Different","_WIDTH_":"Width","_WIDTH_CORRECT_":"Width Correction","_WORKING_MODE_":"Working Mode","_WRO_VAL_MSG_":"You Entered Wrong Values
Please Correct and Continue.","_WRO_VALUES_":"Wrong Values","_ZL_MEDIA_DESC_LOO_":"Support multiple protocols (RTSP\/RTMP\/HLS\/HTTP-FLV\/WebSocket-FLV\/GB28181\/HTTP-TS\/WebSocket-TS\/HTTP-fMP4\/WebSocket-fMP4\/MP4\/WebRTC), support protocol interconversion.","_ZL_MEDIA_DESC_SHO_":"ZLMediaKit Server - Streaming Encoder","05b048d7242cb7b8b57cfa3b1d65ecea":"Gamma","0737d367234baa9eb0d7d93044d4cdcb":"AGC","0e6ebfbce4a1d380a356f7d0ca501db2":"Zoom Frame","1f9d92d5edaba165f934540a3525112a":"Tilt Frame","20e57f32ba12b9cd13ebe9ef5e32d949":"Invert","210ab9e731c9c36c2c38db15c28a8d1c":"Volume","3a5769e56038d8308b08f8741077d943":"Odd Field Offset","3b2d7435a9d67b3630988c398af85da5":"Sharpness","442348a3a2d4dc460bf2e86b1e97bd71":"Power Line","4cf296191801ec357d2aa0ad3a484cba":"Manual WB","5f458c0f2db08c33596b0e7a8dbc0e5b":"Manual Exp.","71a6b6f094346a8832df801c8428ea06":"Hue","885cd2552e1136cfd94ae863668e8942":"Even Field Offset","aa71a2ef3fb13c2642ea72645a698cb8":"Brightness","AUTO_DRAW":"Automatic Draw","b4e67baf7b29f6474d4ac44008dafed4":"BL Compensation","b914f4cdf61e27d144e5ceef61eec7a2":"Automute","bba4e31fa5d5b2fee356b87111a52aa3":"Horizontal Flip","c8fd07f040a8f2dc85f5b2d3804ea3db":"Contrast","cc0d5ee2cdb80bf82426e9def9f9bf7c":"Pan Frame","def9cbe59ce34853e7081f62b095e348":"Mute","ed063c64d46ede5916894e6ac2ab9ce1":"Auto WB","Error_Message":"Error Message","ETHERNET_PROP":"Ethernet","facdbb51cba54d1eccbdd8bd670e7b33":"Auto Exp.","fb520ff39848b91b70496ecf6c67f68e":"Compression Quality","fd71ed58ae07cc75900a5169e6f9c287":"Saturation","FILTER_AFP":"Authorised Persons Filter","FILTER_TRAIN":"Train Target Filter","FRAMEGRAB_PROP":"Analog Video","MOD_TYPE":"Module Type","MODE_ACCESS_POINT":"Access Point","MODE_DISABLED":"Disabled","MODE_ETHDYNAMIC":"Dynamic Address (DHCP)","MODE_ETHROUTER":"Static Address Router","MODE_ETHSTATIC":"Static Address","MODULE_DCBUSB":"USB Dry Contact Control Module","MODULE_EMB_VIDO":"Internal Video Encoder","MODULE_FLYHUNT":"FlyHunter Drone Control","MODULE_GPS":"GPS Time Sync Module","MODULE_KAFKA":"Kafka Data Proxy","MODULE_MODEM_MAN":"Modem Manager","MODULE_NETWORK":"Network Module [TBD]","MODULE_ONVIF_DIS":"OnVif Discovery","MODULE_SSDP":"Network Announcer","MODULE_ZLMEDIA":"ZLMedia Server","SENS_NAME":"Sensor's Name","SENS_RANGE":"Sensor Range","SENS_TYPE":"Sensor's Type","SERV_BLD_TAG":"Build Tag","SERV_NAME":"Server Name","SETIAL_TAG":"Serial Tag","SRV_STATUS_OFF":"Server is Offline","SRV_STATUS_ON":"Server is Online","SYS_MSG_DEVINV":"The Connected Device is Different from","SYS_SERVNAME":"Argus Server","UART_COM_BITS":"Bits","UART_COM_PARITY":"Parity","UART_COM_SBITS":"Stop Bits","UART_COM_SPEED":"Com Speed","UART_LINE_PROP":"UART","VIRTUALIP_PROP":"Virtual IP","VPN_TUN_PROP":"VPN Tunel","WAN_LINE_PROP":"WAN Connection","WIFI_PROP":"WiFi"}
\ No newline at end of file
diff --git a/lib/controller/addMap.php b/lib/controller/addMap.php
index bd9aabc..3f35504 100644
--- a/lib/controller/addMap.php
+++ b/lib/controller/addMap.php
@@ -41,31 +41,66 @@
$ENAME = $DATABASE->escape($_POST['map_name']);
$EDESC = $DATABASE->escape($_POST['map_desc']);
$EATTR = $DATABASE->escape($_POST['map_attr']);
- $IZOOM = intval( $_POST['map_maxz'] );
- $INZOOM = intval( $_POST['map_maxz'] );
- $MA_WI = floatval( $_POST['map_width'] );
- $MA_HE = floatval( $_POST['map_height'] );
$TB = intval( $_POST['map_tpb'] );
$LB = intval( $_POST['map_lpb'] );
$RB = intval( $_POST['map_rpb'] );
- $BB = intval( $_POST['map_bpb'] );
- $BM = intval( $_POST['bounds_mode'] );
- $K_X = $MA_WI / ( $width - $LB - $RB );
- $K_Y = $MA_HE / ( $height - $TB - $BB );
- if( $BM ){
- $THW = (($width + $RB + $LB) * $K_X ) / 2.0;
- $THH = (($height + $BB + $TB) * $K_Y ) / 2.0;
- $IBLX = -$THW;
- $IBLY = -$THH;
- $IBRX = $THW;
- $IBRY = $THH;
+ $BB = intval( $_POST['map_bpb'] );
+ $CSYS = 2 + intval( $_POST['map_corsys'] );
+ if( $CSYS == 2 ){
+ $INZOOM = intval( $_POST['map_maxnz'] );
+ $IZOOM = intval( $_POST['map_maxz'] );
+ $MA_WI = floatval( $_POST['map_width'] );
+ $MA_HE = floatval( $_POST['map_height'] );
+ $BM = intval( $_POST['bounds_mode'] );
+ $K_X = $MA_WI / ( $width - $LB - $RB );
+ $K_Y = $MA_HE / ( $height - $TB - $BB );
+ if( $BM ){
+ $THW = (($width + $RB + $LB) * $K_X ) / 2.0;
+ $THH = (($height + $BB + $TB) * $K_Y ) / 2.0;
+ $IBLX = -$THW;
+ $IBLY = -$THH;
+ $IBRX = $THW;
+ $IBRY = $THH;
+ } else {
+ $IBLX = (-$LB)*$K_X;
+ $IBLY = (-$TB)*$K_Y;
+ $IBRX = ( $width + $RB ) * $K_X;
+ $IBRY = ( $height + $BB ) * $K_Y;
+ };
} else {
- $IBLX = (-$LB)*$K_X;
- $IBLY = (-$TB)*$K_Y;
- $IBRX = ( $width + $RB ) * $K_X;
- $IBRY = ( $height + $BB ) * $K_Y;
+ $BM = 0;
+ $LTLAT = floatval( $_POST['map_lcclat'] );
+ $LTLON = floatval( $_POST['map_lcclon'] );
+ $RBLAT = floatval( $_POST['map_rcclat'] );
+ $RBLON = floatval( $_POST['map_rcclon'] );
+ if( $TB+$LB+$RB+$BB ){
+ $KX = ( $RBLON - $LTLON )/( $width - $LB - $RB );
+ $KY = ( $RBLAT - $LTLAT )/( $height - $TB - $BB );
+ $LTLON = $LTLON - $KX * $LB;
+ $LTLAT = $LTLAT + $KY * $TB;
+ $RBLON = $RBLON + $KX * $RB;
+ $RBLAT = $RBLAT - $KY * $BB;
+ };
+ $INZOOM = intval( $_POST['map_maxnz'] );
+ $IZOOM = intval( $_POST['map_maxz'] );
+ $IBLX = $LTLON;
+ $IBLY = $LTLAT;
+ $IBRX = $RBLON;
+ $IBRY = $RBLAT;
+ $MA_WI = $IBRX - $IBLX;
+ $MA_HE = $IBLY - $IBRY;
+ // zoom 180.0 --> 0
+ $SANV = 360.0;
+ for( $i = 0; $i< 32; $i++ ){
+ $CANV = $SANV /(1<< $i);
+ if( $CANV < $MA_WI ){
+ $INZOOM = $i+5;
+ $IZOOM = $INZOOM;
+ break;
+ };
+ };
};
- $QS = "INSERT INTO `location_maps`(`type`,`name`,`layer_url`,`desc`,`maxNativeZoom`,`maxZoom`,`attribution`,`bounds_lx`,`bounds_ly`,`bounds_rx`,`bounds_ry`,`bounds_mode`,`img_w`,`img_h`,`img_map_w`,`img_map_h`,`img_lb`,`img_tb`,`img_rb`,`img_bb`) values(2,'{$ENAME}','{$FNAME}','{$EDESC}',{$INZOOM},{$IZOOM},'{$EATTR}',{$IBLX},{$IBLY},{$IBRX},{$IBRY},{$BM},{$width},{$height},{$MA_WI},{$MA_HE},{$LB},{$TB},{$RB},{$BB})";
+ $QS = "INSERT INTO `location_maps`(`type`,`name`,`layer_url`,`desc`,`maxNativeZoom`,`maxZoom`,`attribution`,`bounds_lx`,`bounds_ly`,`bounds_rx`,`bounds_ry`,`bounds_mode`,`img_w`,`img_h`,`img_map_w`,`img_map_h`,`img_lb`,`img_tb`,`img_rb`,`img_bb`) values({$CSYS},'{$ENAME}','{$FNAME}','{$EDESC}',{$INZOOM},{$IZOOM},'{$EATTR}',{$IBLX},{$IBLY},{$IBRX},{$IBRY},{$BM},{$width},{$height},{$MA_WI},{$MA_HE},{$LB},{$TB},{$RB},{$BB})";
$DATABASE->Query( $QS );
verbose( 1, "ALL IS OK" );
};
diff --git a/lib/controller/data/reports.db b/lib/controller/data/reports.db
deleted file mode 100644
index cddebee..0000000
Binary files a/lib/controller/data/reports.db and /dev/null differ
diff --git a/lib/javascript/jsapi_dynamic/mojo_map.js b/lib/javascript/jsapi_dynamic/mojo_map.js
index 077f4a5..52ad535 100644
--- a/lib/javascript/jsapi_dynamic/mojo_map.js
+++ b/lib/javascript/jsapi_dynamic/mojo_map.js
@@ -380,48 +380,68 @@ function initMapMonitoring(){
map.remove();
map = null;
};
- if( MAP_SET.type == 1 ){
- map = L.map( 'event_map',{
- //attributionControl: aK,
- attributionControl: false,
- preferCanvas: true,
- zoomControl: true,
- center: [SiteLat, SiteLon],
- /*zoomControl: false,
- zoom: 17,
- minZoom: 17,
- maxZoom: 17,*/
- keyboard: false
- });
- map.setView([SiteLat, SiteLon], 17 );
- //mapLayers[ MAP_SET.name ] = L.tileLayer( MAP_SET.layer_url, {
- // attribution: MAP_SET.attribution,
- // maxNativeZoom: MAP_SET.maxNativeZoom,
- // maxZoom: MAP_SET.maxZoom
- //});
- L.tileLayer( MAP_SET.layer_url, {
- attribution: MAP_SET.attribution,
- attributionControl: false,
- maxNativeZoom: MAP_SET.maxNativeZoom,
- //minZoom: 0,
- maxZoom: MAP_SET.maxZoom
- }).addTo( map );
- } else {
- map = L.map( 'event_map',{
- crs: L.CRS.Simple,
- attributionControl: false,
- preferCanvas: true,
- zoomControl: true,
- center: [SiteLat, SiteLon],
- /*zoomControl: false,*/
- zoom: 0,
- minZoom: -1,
- maxZoom: 4,
- keyboard: false
- });
- var bounds = [[MAP_SET.bounds_lx,MAP_SET.bounds_ly], [MAP_SET.bounds_rx,MAP_SET.bounds_ry]];
- var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map );
- //map.setView([SiteLat, SiteLon], -1 );
+ switch( MAP_SET.type ){
+ case 1: {
+ map = L.map( 'event_map',{
+ //attributionControl: aK,
+ attributionControl: false,
+ preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat, SiteLon],
+ /*zoomControl: false,
+ zoom: 17,
+ minZoom: 17,
+ maxZoom: 17,*/
+ keyboard: false
+ });
+ map.setView([SiteLat, SiteLon], 17 );
+ //mapLayers[ MAP_SET.name ] = L.tileLayer( MAP_SET.layer_url, {
+ // attribution: MAP_SET.attribution,
+ // maxNativeZoom: MAP_SET.maxNativeZoom,
+ // maxZoom: MAP_SET.maxZoom
+ //});
+ L.tileLayer( MAP_SET.layer_url, {
+ attribution: MAP_SET.attribution,
+ attributionControl: false,
+ maxNativeZoom: MAP_SET.maxNativeZoom,
+ //minZoom: 0,
+ maxZoom: MAP_SET.maxZoom
+ }).addTo( map );
+ break;
+ };
+ case 2:{
+ map = L.map( 'event_map',{
+ crs: L.CRS.Simple,
+ attributionControl: false,
+ preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat, SiteLon],
+ /*zoomControl: false,*/
+ zoom: 2,
+ minZoom: -1,
+ maxZoom: 4,
+ keyboard: false
+ });
+ var bounds = [[MAP_SET.bounds_lx,MAP_SET.bounds_ly], [MAP_SET.bounds_rx,MAP_SET.bounds_ry]];
+ var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map );
+ //map.setView([SiteLat, SiteLon], -1 );
+ break;
+ };
+ case 3:{
+ map = L.map( 'event_map',{
+ attributionControl: false,
+ preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat,SiteLon],
+ zoom: MAP_SET.maxZoom - 2,
+ minZoom: MAP_SET.maxZoom - 4,
+ maxZoom: MAP_SET.maxZoom,
+ keyboard: false
+ });
+ var bounds = [[MAP_SET.bounds_ly,MAP_SET.bounds_lx], [MAP_SET.bounds_ry,MAP_SET.bounds_rx]];
+ var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map );
+ break;
+ };
};
//ToDo: Fix Initial Zoom level -> May be saving into a user profile
loadMapZones( 0 );
@@ -437,48 +457,68 @@ function initMapReporting(){
map.remove();
map = null;
};
- if( MAP_SET.type == 1 ){
- map = L.map( 'report_map',{
- //attributionControl: aK,
- attributionControl: false,
- preferCanvas: true,
- zoomControl: true,
- center: [SiteLat, SiteLon],
- /*zoomControl: false,
- zoom: 17,
- minZoom: 17,
- maxZoom: 17,*/
- keyboard: false
- });
- map.setView([SiteLat, SiteLon], 17 );
- //mapLayers[ MAP_SET.name ] = L.tileLayer( MAP_SET.layer_url, {
- // attribution: MAP_SET.attribution,
- // maxNativeZoom: MAP_SET.maxNativeZoom,
- // maxZoom: MAP_SET.maxZoom
- //});
- L.tileLayer( MAP_SET.layer_url, {
- attribution: MAP_SET.attribution,
- attributionControl: false,
- maxNativeZoom: MAP_SET.maxNativeZoom,
- minZoom: 0,
- maxZoom: MAP_SET.maxZoom
- }).addTo( map );
- } else {
- map = L.map( 'report_map',{
- crs: L.CRS.Simple,
- attributionControl: false,
- preferCanvas: true,
- zoomControl: true,
- center: [SiteLat, SiteLon],
- /*zoomControl: false,*/
- zoom: 0,
- minZoom: -1,
- maxZoom: 4,
- keyboard: false
- });
- var bounds = [[MAP_SET.bounds_lx,MAP_SET.bounds_ly], [MAP_SET.bounds_rx,MAP_SET.bounds_ry]];
- var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map );
- //map.setView([SiteLat, SiteLon], -1 );
+ switch( MAP_SET.type ){
+ case 1:{
+ map = L.map( 'report_map',{
+ //attributionControl: aK,
+ attributionControl: false,
+ preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat, SiteLon],
+ /*zoomControl: false,
+ zoom: 17,
+ minZoom: 17,
+ maxZoom: 17,*/
+ keyboard: false
+ });
+ map.setView([SiteLat, SiteLon], 17 );
+ //mapLayers[ MAP_SET.name ] = L.tileLayer( MAP_SET.layer_url, {
+ // attribution: MAP_SET.attribution,
+ // maxNativeZoom: MAP_SET.maxNativeZoom,
+ // maxZoom: MAP_SET.maxZoom
+ //});
+ L.tileLayer( MAP_SET.layer_url, {
+ attribution: MAP_SET.attribution,
+ attributionControl: false,
+ maxNativeZoom: MAP_SET.maxNativeZoom,
+ minZoom: 0,
+ maxZoom: MAP_SET.maxZoom
+ }).addTo( map );
+ break;
+ };
+ case 2:{
+ map = L.map( 'report_map',{
+ crs: L.CRS.Simple,
+ attributionControl: false,
+ preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat, SiteLon],
+ /*zoomControl: false,*/
+ zoom: 0,
+ minZoom: -1,
+ maxZoom: 4,
+ keyboard: false
+ });
+ var bounds = [[MAP_SET.bounds_lx,MAP_SET.bounds_ly], [MAP_SET.bounds_rx,MAP_SET.bounds_ry]];
+ var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map );
+ //map.setView([SiteLat, SiteLon], -1 );
+ break;
+ };
+ case 3:{
+ map = L.map( 'report_map',{
+ attributionControl: false,
+ preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat,SiteLon],
+ zoom: MAP_SET.maxZoom - 2,
+ minZoom: MAP_SET.maxZoom - 4,
+ maxZoom: MAP_SET.maxZoom,
+ keyboard: false
+ });
+ var bounds = [[MAP_SET.bounds_ly,MAP_SET.bounds_lx], [MAP_SET.bounds_ry,MAP_SET.bounds_rx]];
+ var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map );
+ break;
+ };
};
//ToDo: Fix Initial Zoom level -> May be saving into a user profile
loadMapZones( 0 );
@@ -984,46 +1024,66 @@ function loadLocationEditor( el_id , node_type, node_id, lat, lon ){
map_ed.off();
map_ed.remove();
};
- if( MAP_SET.type == 1 ){
- map_ed = L.map( el_id,{
- attributionControl: aK,
- //preferCanvas: true,
- zoomControl: true,
- center: [SiteLat,SiteLon],
- /*zoomControl: false,
- zoom: 17,
- minZoom: 17,
- maxZoom: 17,*/
- keyboard: false
- });
- //mapLayers[ MAP_SET.name ] = L.tileLayer( MAP_SET.layer_url, {
- // attribution: MAP_SET.attribution,
- // maxNativeZoom: MAP_SET.maxNativeZoom,
- // maxZoom: MAP_SET.maxZoom
- //});
- L.tileLayer( MAP_SET.layer_url, {
- attribution: MAP_SET.attribution,
- maxNativeZoom: MAP_SET.maxNativeZoom,
- minZoom: 0,
- maxZoom: MAP_SET.maxZoom
- }).addTo( map_ed );
- } else {
- map_ed = L.map( el_id,{
- crs: L.CRS.Simple,
- attributionControl: false,
- preferCanvas: true,
- zoomControl: true,
- center: [SiteLat,SiteLon],
- /*zoomControl: false,*/
- zoom: 0,
- minZoom: 0,
- maxZoom: 4,
- keyboard: false
- });
- var bounds = [[MAP_SET.bounds_lx,MAP_SET.bounds_ly], [MAP_SET.bounds_rx,MAP_SET.bounds_ry]];
- var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map_ed );
- }
- map_ed.setView([SiteLat,SiteLon], MAP_SET.maxZoom);
+ switch( MAP_SET.type ){
+ case 1:{
+ map_ed = L.map( el_id,{
+ attributionControl: aK,
+ //preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat,SiteLon],
+ /*zoomControl: false,
+ zoom: 17,
+ minZoom: 17,
+ maxZoom: 17,*/
+ keyboard: false
+ });
+ //mapLayers[ MAP_SET.name ] = L.tileLayer( MAP_SET.layer_url, {
+ // attribution: MAP_SET.attribution,
+ // maxNativeZoom: MAP_SET.maxNativeZoom,
+ // maxZoom: MAP_SET.maxZoom
+ //});
+ L.tileLayer( MAP_SET.layer_url, {
+ attribution: MAP_SET.attribution,
+ maxNativeZoom: MAP_SET.maxNativeZoom,
+ minZoom: 0,
+ maxZoom: MAP_SET.maxZoom
+ }).addTo( map_ed );
+ break;
+ };
+ case 2:{
+ map_ed = L.map( el_id,{
+ crs: L.CRS.Simple,
+ attributionControl: false,
+ preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat,SiteLon],
+ /*zoomControl: false,*/
+ zoom: 0,
+ minZoom: 0,
+ maxZoom: 4,
+ keyboard: false
+ });
+ var bounds = [[MAP_SET.bounds_lx,MAP_SET.bounds_ly], [MAP_SET.bounds_rx,MAP_SET.bounds_ry]];
+ var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map_ed );
+ break;
+ };
+ case 3:{
+ map_ed = L.map( el_id,{
+ attributionControl: false,
+ preferCanvas: true,
+ zoomControl: true,
+ center: [SiteLat,SiteLon],
+ zoom: MAP_SET.maxZoom - 2,
+ minZoom: MAP_SET.maxZoom - 4,
+ maxZoom: MAP_SET.maxZoom,
+ keyboard: false
+ });
+ var bounds = [[MAP_SET.bounds_ly,MAP_SET.bounds_lx], [MAP_SET.bounds_ry,MAP_SET.bounds_rx]];
+ var image = L.imageOverlay( '/lib/controller/data/assets/images/'+MAP_SET.layer_url, bounds ).addTo( map_ed );
+ break;
+ };
+ };
+ map_ed.setView([SiteLat,SiteLon], MAP_SET.maxZoom );
if( node_type ){
ed_anchor = L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon, zIndexOffset: 1000 } ).addTo(map_ed).bindPopup("=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?>");//.openPopup();
} else {
@@ -1301,7 +1361,7 @@ function createNewMap(){
if( mapCreatorWindow == null ){
mapCreatorWindow = new Ext.Window({
width: 800,
- height: 540,
+ height: 580,
title: '=$Labels->GetLabel('_CREATE_CUSTOM_MAP_');?>',
modal: true,
frame: true,
@@ -1318,7 +1378,7 @@ function createNewMap(){
fileUpload: true,
labelWidth: 250,
labelAlign: 'right',
- height: 450,
+ height: 490,
items:[{
xtype: 'textfield',
fieldLabel: '=$Labels->GetLabel('_NAME_MAP_');?>',
@@ -1383,7 +1443,7 @@ function createNewMap(){
title: '=$Labels->GetLabel('_LOCAL_PIC_MAP_');?>',
id: 'map_pic_frm',
fileUpload: true,
- height: 450,
+ height: 490,
//autoHeight: true,
//bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth: 250,
@@ -1426,6 +1486,7 @@ function createNewMap(){
fieldLabel: '=$Labels->GetLabel('_MAX_ZOOM_');?>',
editable: false,
typeAhead: true,
+ id: 'map_maxz',
name: 'map_maxz',
triggerAction: 'all',
width: 100,
@@ -1435,7 +1496,7 @@ function createNewMap(){
fields: ['zoom_l'],
data: [['16'], ['17'],['18'],['19'],['20'],['21'],['22'],['23'],['24'],['25'],['26'],['27'],['28']]
}),
- value: '16',
+ value: '4',
valueField: 'zoom_l',
displayField: 'zoom_l'
},{
@@ -1443,6 +1504,7 @@ function createNewMap(){
fieldLabel: '=$Labels->GetLabel('_MAX_NATURAL_ZOOM_');?>',
editable: false,
typeAhead: true,
+ id: 'map_maxnz',
name: 'map_maxnz',
triggerAction: 'all',
width: 100,
@@ -1452,7 +1514,7 @@ function createNewMap(){
fields: ['zoom_l'],
data: [['16'], ['17'],['18'],['19'],['20'],['21'],['22'],['23'],['24'],['25'],['26'],['27'],['28']]
}),
- value: '16',
+ value: '4',
valueField: 'zoom_l',
displayField: 'zoom_l'
},{
@@ -1479,9 +1541,46 @@ function createNewMap(){
name: 'map_bpb',
value: 0,
width: 540,
+ },{
+ xtype: 'combo',
+ fieldLabel: '=$Labels->GetLabel('_MAP_COORD_SYSTEM_');?>',
+ editable: false,
+ typeAhead: true,
+ hiddenName: 'map_corsys',
+ triggerAction: 'all',
+ width: 540,
+ lazyRender:true,
+ mode: 'local',
+ store: new Ext.data.ArrayStore({
+ fields: ['C_SYS_V','C_SYS'],
+ data: [[0,'Meters from map Centre'], [1,'WGS84(GPS)']]
+ }),
+ listeners:{
+ select: function( a, b, c ){
+ if( c ){
+ Ext.getCmp('map_height').hide();
+ Ext.getCmp('map_maxz').hide();
+ Ext.getCmp('map_maxnz').hide();
+ Ext.getCmp('map_width').hide();
+ Ext.getCmp('map_cpp').hide();
+ Ext.getCmp('map_cpb').show();
+ } else {
+ Ext.getCmp('map_height').show();
+ Ext.getCmp('map_maxz').show();
+ Ext.getCmp('map_maxnz').show();
+ Ext.getCmp('map_width').show();
+ Ext.getCmp('map_cpp').show();
+ Ext.getCmp('map_cpb').hide();
+ };
+ }
+ },
+ value: '0',
+ valueField: 'C_SYS_V',
+ displayField: 'C_SYS'
},{
xtype: 'numberfield',
fieldLabel: '=$Labels->GetLabel('_MAP_WIDTH_');?>',
+ id: 'map_height',
name: 'map_height',
decimalPrecision: 2,
value: 1000.00,
@@ -1489,12 +1588,14 @@ function createNewMap(){
},{
xtype: 'numberfield',
fieldLabel: '=$Labels->GetLabel('_MAP_HEIGHT_');?>',
+ id: 'map_width',
name: 'map_width',
decimalPrecision: 2,
value: 1000.00,
width: 540,
},{
xtype: 'panel',
+ id: 'map_cpp',
frame: false,
border: false,
layout: 'table',
@@ -1521,6 +1622,69 @@ function createNewMap(){
},{
html: '
'
}]
+ },{
+ xtype: 'panel',
+ id: 'map_cpb',
+ frame: false,
+ border: false,
+ hidden: true,
+ layout: 'table',
+ layoutConfig: {
+ columns: 5
+ },
+ items:[{
+ xtype: 'spacer',
+ width: 250,
+ html: '=$Labels->GetLabel('_MAP_LEFT_CORCORD_');?>:
'
+ },{
+ xtype: 'spacer',
+ width: 100,
+ html: '=$Labels->GetLabel('_LAT_');?>
'
+ },{
+ xtype: 'numberfield',
+ id: 'map_lcclat',
+ name: 'map_lcclat',
+ decimalPrecision: 8,
+ value: 32.0001,
+ width: 150,
+ },{
+ xtype: 'spacer',
+ width: 100,
+ html: '=$Labels->GetLabel('_LON_');?>
'
+ },{
+ xtype: 'numberfield',
+ id: 'map_lcclon',
+ name: 'map_lcclon',
+ decimalPrecision: 8,
+ value: 32.0001,
+ width: 150,
+ },{
+ xtype: 'spacer',
+ width: 250,
+ html: '=$Labels->GetLabel('_MAP_RIGHT_CORCORD_');?>:
'
+ },{
+ xtype: 'spacer',
+ width: 100,
+ html: '=$Labels->GetLabel('_LAT_');?>
'
+ },{
+ xtype: 'numberfield',
+ id: 'map_rcclat',
+ name: 'map_rcclat',
+ decimalPrecision: 8,
+ value: 32.0001,
+ width: 150,
+ },{
+ xtype: 'spacer',
+ width: 100,
+ html: '=$Labels->GetLabel('_LON_');?>
'
+ },{
+ xtype: 'numberfield',
+ id: 'map_rcclon',
+ name: 'map_rcclon',
+ decimalPrecision: 8,
+ value: 32.0001,
+ width: 150,
+ }]
}]
}]
}],
@@ -1575,12 +1739,27 @@ function createNewMap(){
};
var mapEditorWindow = null;
+function deleteCurrentMap(){
+ Ext.Ajax.request({
+ url: '/lib/controller/delMapData.php',
+ params: {
+ SITE: =$SiteID;?>,
+ UID: =$UserID;?>,
+ SID: '=$Session;?>',
+ MID: MAP_ID
+ },
+ success: function( response, opts ){
+ location.reload();
+ }
+ });
+};
function editCurrentMap(){
Ext.Ajax.request({
url: '/lib/controller/getMapData.php',
params: {
SITE: =$SiteID;?>,
UID: =$UserID;?>,
+ SID: '=$Session;?>',
MID: MAP_ID
},
success: function( response, opts ){
diff --git a/lib/javascript/jsapi_dynamic/mojo_settings.js b/lib/javascript/jsapi_dynamic/mojo_settings.js
index 4f574b6..c7400b4 100644
--- a/lib/javascript/jsapi_dynamic/mojo_settings.js
+++ b/lib/javascript/jsapi_dynamic/mojo_settings.js
@@ -2473,14 +2473,14 @@ function showSettingsApplication(){
LoadNodesList();
}
}
- },{
+ }/*,{
xtype: 'button',
disabled: false,
text: '=$Labels->GetLabel('_EDIT_');?>',
handler: function(){
editCurrentMap();
}
- },{
+ }*/,{
xtype: 'button',
disabled: false,
text: '=$Labels->GetLabel('_DELETE_');?>',