@ -84,6 +84,9 @@ function turnAllGzOn(){
if ( ! map . hasLayer ( ActiveZones . center [ i ] ) ) map . addLayer ( ActiveZones . center [ i ] ) ;
} ;
var cVisible = L . featureGroup ( tall ) ;
//window.setTimeout(() => {
// map.flyToBounds( cVisible.getBounds() );
//}, 500);
map . flyToBounds ( cVisible . getBounds ( ) ) ;
} ;
@ -276,7 +279,97 @@ function LoadMapEventsZ( Mode ){
}
} ) ;
} ;
function initMapMonitoring__00 ( ) {
map = L . map ( 'event_map' , {
attributionControl : true ,
//preferCanvas: true,
zoomControl : true ,
center : [ SiteLat , SiteLon ] ,
/ * z o o m C o n t r o l : f a l s e ,
zoom : 17 ,
minZoom : 17 ,
maxZoom : 17 , * /
keyboard : false
} ) . setView ( [ SiteLat , SiteLon ] , 17 ) ;
//L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon } ).addTo(map).on('click', LoadNodesList ).bindPopup("<b><?=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?></b>");
var mapLayers = [ ] ;
/*mapLayers["Bing"] = new BingLayer('https:/ / t { s } . ssl . ak . dynamic . tiles . virtualearth . net / comp / ch / { q } ? it = A , G , L & shading = hill ' , {
subdomains : [ '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' ] ,
attribution : '© <a href="https://bing.com/maps" target="_blank">Bing Maps</a>' ,
detectRetina : true
} ) ; * /
mapLayers [ "MyMap" ] = L . tileLayer ( 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' , {
attribution : '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' ,
maxNativeZoom : 18 ,
maxZoom : 24 ,
} )
// https://leaflet-extras.github.io/leaflet-providers/preview/
mapLayers [ "EsriStreet" ] = L . tileLayer ( 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}' , {
attribution : 'Tiles © <a href="https://www.esri.com" target="_blank">Esri</a> — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' ,
maxZoom : 19
} ) ;
mapLayers [ "EsriSat" ] = L . tileLayer ( 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}' , {
attribution : 'Tiles © <a href="https://www.esri.com" target="_blank">Esri</a> — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' ,
maxZoom : 19
} ) ;
mapLayers [ "EsriTopo" ] = L . tileLayer ( 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}' , {
attribution : 'Tiles © <a href="https://www.esri.com" target="_blank">Esri</a> — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community' ,
maxZoom : 24
} ) ;
mapLayers [ "OpenStreetMap" ] = L . tileLayer ( "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" , { //de/tiles/osmde
attribution : 'Map data © <a href="https://openstreetmap.org" target="_blank">OpenStreetMap</a> contributors' ,
maxZoom : 19
} ) ;
mapLayers [ "OpenTopoMap" ] = L . tileLayer ( "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png" , {
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" ] ,
"OpenTopoMap" : mapLayers [ "OpenTopoMap" ] ,
"EsriSat" : mapLayers [ "EsriSat" ] ,
"EsriStreet" : mapLayers [ "EsriStreet" ] ,
"EsriTopo" : mapLayers [ "EsriTopo" ] ,
//"Bing": mapLayers["Bing"],
//"OSM-Cycle": mapLayers["Cycle"],
//"Landscape": mapLayers["Landscape"],
//"Outdoor": mapLayers["Outdoor"],
} ;
//L.control.layers( baseMaps ).addTo(map);
mapLayers [ "MyMap" ] . addTo ( map ) ;
/*L.tileLayer('https:/ / { s } . tile . openstreetmap . org / { z } / { x } / { y } . png ' , {
attribution : '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' ,
maxNativeZoom : 18 ,
maxZoom : 24 ,
} ) . addTo ( map ) ; * /
//loadTimeLineGroups( selectedSite );
loadMapZones ( 0 ) ;
//getData( 'arch' );
} ;
function initMapMonitoring ( ) {
var aK = true ;
if ( MAP_SET . attribution == '' ) aK = false ;
@ -300,6 +393,7 @@ function initMapMonitoring(){
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,
@ -309,10 +403,9 @@ function initMapMonitoring(){
attribution : MAP_SET . attribution ,
attributionControl : false ,
maxNativeZoom : MAP_SET . maxNativeZoom ,
minZoom : 0 ,
//minZoom: 0,
maxZoom : MAP_SET . maxZoom
} ) . addTo ( map ) ;
//map.setView([SiteLat, SiteLon], 17 );
} else {
map = L . map ( 'event_map' , {
crs : L . CRS . Simple ,
@ -357,6 +450,7 @@ function initMapReporting(){
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,
@ -369,7 +463,6 @@ function initMapReporting(){
minZoom : 0 ,
maxZoom : MAP_SET . maxZoom
} ) . addTo ( map ) ;
//map.setView([SiteLat, SiteLon], 17 );
} else {
map = L . map ( 'report_map' , {
crs : L . CRS . Simple ,
@ -391,98 +484,6 @@ function initMapReporting(){
loadMapZones ( 0 ) ;
} ;
function initMapMonitoring_00 ( ) {
map = L . map ( 'event_map' , {
attributionControl : true ,
//preferCanvas: true,
zoomControl : true ,
center : [ SiteLat , SiteLon ] ,
/ * z o o m C o n t r o l : f a l s e ,
zoom : 17 ,
minZoom : 17 ,
maxZoom : 17 , * /
keyboard : false
} ) . setView ( [ SiteLat , SiteLon ] , 17 ) ;
//L.marker([SiteLat, SiteLon], { draggable: false, icon: SITEZ_Icon } ).addTo(map).on('click', LoadNodesList ).bindPopup("<b><?=$Labels->GetLabel('_SYS_ANCHORT_LBL_');?></b>");
var mapLayers = [ ] ;
/*mapLayers["Bing"] = new BingLayer('https:/ / t { s } . ssl . ak . dynamic . tiles . virtualearth . net / comp / ch / { q } ? it = A , G , L & shading = hill ' , {
subdomains : [ '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' ] ,
attribution : '© <a href="https://bing.com/maps" target="_blank">Bing Maps</a>' ,
detectRetina : true
} ) ; * /
mapLayers [ "MyMap" ] = L . tileLayer ( 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' , {
attribution : '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' ,
maxNativeZoom : 18 ,
maxZoom : 24 ,
} )
// https://leaflet-extras.github.io/leaflet-providers/preview/
mapLayers [ "EsriStreet" ] = L . tileLayer ( 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}' , {
attribution : 'Tiles © <a href="https://www.esri.com" target="_blank">Esri</a> — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' ,
maxZoom : 19
} ) ;
mapLayers [ "EsriSat" ] = L . tileLayer ( 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}' , {
attribution : 'Tiles © <a href="https://www.esri.com" target="_blank">Esri</a> — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' ,
maxZoom : 19
} ) ;
mapLayers [ "EsriTopo" ] = L . tileLayer ( 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}' , {
attribution : 'Tiles © <a href="https://www.esri.com" target="_blank">Esri</a> — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community' ,
maxZoom : 24
} ) ;
mapLayers [ "OpenStreetMap" ] = L . tileLayer ( "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" , { //de/tiles/osmde
attribution : 'Map data © <a href="https://openstreetmap.org" target="_blank">OpenStreetMap</a> contributors' ,
maxZoom : 19
} ) ;
mapLayers [ "OpenTopoMap" ] = L . tileLayer ( "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png" , {
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" ] ,
"OpenTopoMap" : mapLayers [ "OpenTopoMap" ] ,
"EsriSat" : mapLayers [ "EsriSat" ] ,
"EsriStreet" : mapLayers [ "EsriStreet" ] ,
"EsriTopo" : mapLayers [ "EsriTopo" ] ,
//"Bing": mapLayers["Bing"],
//"OSM-Cycle": mapLayers["Cycle"],
//"Landscape": mapLayers["Landscape"],
//"Outdoor": mapLayers["Outdoor"],
} ;
L . control . layers ( baseMaps ) . addTo ( map ) ;
mapLayers [ "MyMap" ] . addTo ( map ) ;
/*L.tileLayer('https:/ / { s } . tile . openstreetmap . org / { z } / { x } / { y } . png ' , {
attribution : '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' ,
maxNativeZoom : 18 ,
maxZoom : 24 ,
} ) . addTo ( map ) ; * /
//loadTimeLineGroups( selectedSite );
loadMapZones ( 0 ) ;
//getData( 'arch' );
} ;
var iconSaver = null ;
var markerSaver = null ;
@ -1300,8 +1301,8 @@ function createNewMap(){
if ( mapCreatorWindow == null ) {
mapCreatorWindow = new Ext . Window ( {
width : 800 ,
height : 4 40,
title : 'Creeate Custom Map ' ,
height : 5 40,
title : '<?=$Labels->GetLabel(' _CREATE_CUSTOM_MAP_ ');?> ' ,
modal : true ,
frame : true ,
border : false ,
@ -1316,7 +1317,7 @@ function createNewMap(){
id : 'map_map_frm' ,
labelWidth : 250 ,
labelAlign : 'right' ,
height : 3 50,
height : 4 50,
items : [ {
xtype : 'textfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _NAME_MAP_ ');?>' ,
@ -1381,7 +1382,7 @@ function createNewMap(){
title : '<?=$Labels->GetLabel(' _LOCAL_PIC_MAP_ ');?>' ,
id : 'map_pic_frm' ,
fileUpload : true ,
height : 3 50,
height : 4 50,
//autoHeight: true,
//bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth : 250 ,
@ -1480,17 +1481,47 @@ function createNewMap(){
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_WIDTH_ ');?>' ,
name : 'map_width ' ,
name : 'map_height ' ,
decimalPrecision : 2 ,
value : 1000.00 ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_HEIGHT_ ');?>' ,
name : 'map_heig th' ,
name : 'map_wid th' ,
decimalPrecision : 2 ,
value : 1000.00 ,
width : 540 ,
} , {
xtype : 'panel' ,
frame : false ,
border : false ,
layout : 'table' ,
layoutConfig : {
columns : 5
} ,
items : [ {
xtype : 'spacer' ,
width : 250 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _MAP_CENTER_MODE_ ');?>:</p>'
} , {
xtype : 'radio' ,
name : 'bounds_mode' ,
value : 0 ,
checked : 1 ,
fieldLabel : '' ,
} , {
width : 80 ,
html : '<img src="/style/assets/cust_map_cord_sys-0.png">'
} , {
xtype : 'radio' ,
name : 'bounds_mode' ,
checked : 0 ,
value : 1 ,
fieldLabel : '' ,
} , {
html : '<img src="/style/assets/cust_map_cord_sys-1.png">'
} ]
} ]
} ]
} ] ,
@ -1499,7 +1530,7 @@ function createNewMap(){
handler : function ( ) {
//Ext.getCmp('map_map_frm').getForm().reset();
//Ext.getCmp('map_pic_frm').getForm().reset();
mapCreatorEditor Window . destroy ( ) ;
mapCreatorWindow . destroy ( ) ;
}
} , {
text : '<?=$Labels->GetLabel(' _CREATE_NEW_LBL_ ');?>' ,
@ -1513,7 +1544,8 @@ function createNewMap(){
encoding : 'multipart/form-data' ,
success : function ( fp , o ) {
//msg('Success', 'Processed file "'+o.result.file+'" on the server');
alert ( 'Processed file on the server' ) ;
//alert('Processed file on the server');
mapCreatorWindow . destroy ( ) ;
}
} ) ;
} ;
@ -1525,7 +1557,8 @@ function createNewMap(){
encoding : 'multipart/form-data' ,
success : function ( fp , o ) {
//msg('Success', 'Processed file "'+o.result.file+'" on the server');
alert ( 'Processed file on the server' ) ;
//alert('Processed file on the server');
mapCreatorWindow . destroy ( ) ;
}
} ) ;
} ;
@ -1534,7 +1567,7 @@ function createNewMap(){
} ] ,
listeners : {
beforedestroy : function ( ) {
mapCreatorEditor Window = null ;
mapCreatorWindow = null ;
}
}
} ) ;
@ -1649,7 +1682,8 @@ function editCurrentMap(){
encoding : 'multipart/form-data' ,
success : function ( fp , o ) {
//msg('Success', 'Processed file "'+o.result.file+'" on the server');
alert ( 'Processed file on the server' ) ;
//alert('Processed file on the server');
mapEditorWindow . destroy ( ) ;
}
} ) ;
} ;
@ -1660,8 +1694,8 @@ function editCurrentMap(){
waitMsg : 'Uploading Image...' ,
encoding : 'multipart/form-data' ,
success : function ( fp , o ) {
//msg('Success', 'Processed file "'+o.result.file+'" on the server');
alert ( 'Processed file on the server' ) ;
//alert('Processed file on the server');
mapEditorWindow . destroy ( ) ;
}
} ) ;
} ;
@ -1680,7 +1714,7 @@ function editCurrentMap(){
mapEditorWindow = new Ext . Window ( {
width : 800 ,
height : 540 ,
title : 'Edit Current Map ' ,
title : '<?=$Labels->GetLabel(' _EDIT_CUR_MAP_ ');?> ' ,
modal : true ,
//closeAction: 'hide',
frame : true ,
@ -1842,15 +1876,17 @@ function editCurrentMap(){
}
} , {
text : '<?=$Labels->GetLabel(' _APPLY_CHANGES_ ');?>' ,
handler : function ( ) {
handler : function ( ) {
if ( Ext . getCmp ( 'map_edt_frm' ) . getForm ( ) . isValid ( ) ) {
Ext . getCmp ( 'map_edt_frm' ) . getForm ( ) . submit ( {
url : '/lib/controller/updateMap.php' ,
waitMsg : 'Uploading Image...' ,
encoding : 'multipart/form-data' ,
success : function ( fp , o ) {
//msg('Success', 'Processed file "'+o.result.file+'" on the server');
alert ( 'Processed file on the server' ) ;
//msg('Success', 'Processed file "'+o.result.file+'" on the server');
//alert('Processed file on the server');
mapEditorWindow . destroy ( ) ;
}
} ) ;
} ;