mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-14 12:01:52 +00:00
Fixed issue where open layers did not work on some browsers
This commit is contained in:
parent
ac53c7ae3c
commit
b6c7403653
1 changed files with 85 additions and 78 deletions
|
@ -122,7 +122,7 @@
|
|||
<select id=viewselect onchange=onDeviceViewChange()>
|
||||
<option value=1>3 wide</option>
|
||||
<option value=2>List</option>
|
||||
<option value=3>Map</option>
|
||||
<option id=viewselectmapoption value=3>Map</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style=float:right id=devListToolbarSort>
|
||||
|
@ -1662,8 +1662,9 @@
|
|||
|
||||
// Add a feature for every Node and change style if connection status changes
|
||||
function updateMapMarkers(selectedMesh) {
|
||||
if ((xxmap != null) && (xxmap.map == null)) loadmap();
|
||||
if (xxmap == null) return;
|
||||
var boundingBox = null;
|
||||
if (xxmap.map == null) loadmap();
|
||||
for (var i in nodes) {
|
||||
var loc = map_parseNodeLoc(nodes[i]);
|
||||
if (loc) { // Draw markers for devices with locations
|
||||
|
@ -1724,6 +1725,8 @@
|
|||
|
||||
// Load the entire map
|
||||
function loadmap() {
|
||||
if (xxmap == null) return;
|
||||
try {
|
||||
// Initialize a Source Vector
|
||||
xxmap.markersSource = new ol.source.Vector();
|
||||
|
||||
|
@ -1811,6 +1814,10 @@
|
|||
xxmap.map.addControl(xxmap.contextmenu);
|
||||
*/
|
||||
//addMeshOptions(); // Adds Mesh names to mesh dropdown
|
||||
} catch (e) {
|
||||
QV('viewselectmapoption', false);
|
||||
xxmap = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Add feature on to Map for a Node
|
||||
|
@ -2425,7 +2432,7 @@
|
|||
if ((meshrights & 4) != 0) x += '<a style=cursor:pointer onclick=p10showDeleteNodeDialog("' + node._id + '")>Delete Device</a>';
|
||||
x += '</div><div style=font-size:x-small>';
|
||||
if (mesh.mtype == 2) x += '<a style=cursor:pointer onclick=p10showNodeNetInfoDialog("' + node._id + '")>Interfaces</a> ';
|
||||
if (node.iploc) x += '<a style=cursor:pointer onclick=p10showNodeLocationDialog("' + node._id + '")>Location</a> ';
|
||||
if ((node.iploc) && (xxmap != null)) x += '<a style=cursor:pointer onclick=p10showNodeLocationDialog("' + node._id + '")>Location</a> ';
|
||||
x += '</div><br>'
|
||||
|
||||
QH('p10html3', x);
|
||||
|
|
Loading…
Reference in a new issue