Disable elevation module on IE & Edge.
This commit is contained in:
@@ -453,6 +453,7 @@ class Spot extends Main
|
||||
public function setAdminSettings($sType, $iId, $sField, $sValue) {
|
||||
$bSuccess = false;
|
||||
$sDesc = '';
|
||||
$asResult = array();
|
||||
|
||||
switch($sType) {
|
||||
case 'project':
|
||||
|
||||
@@ -391,6 +391,7 @@ function initSpotMessages(aoMessages, aoTracks, bNoFeed) {
|
||||
oScale = L.control.scale({imperial: false, 'position':'bottomright'}).addTo(oMap);
|
||||
|
||||
//Controls: Elevation
|
||||
if(!isIE() && !isMobile()) {
|
||||
var oElev = L.control.elevation({
|
||||
collapsed: true,
|
||||
position: "bottomright",
|
||||
@@ -405,18 +406,20 @@ function initSpotMessages(aoMessages, aoTracks, bNoFeed) {
|
||||
onCollapse: function(){$('.leaflet-control-scale').show();}
|
||||
}).addTo(oMap);
|
||||
self.tmp('elev', oElev);
|
||||
}
|
||||
|
||||
//Controls: Tiles (layers): Add & Move to Settings Panel
|
||||
L.control.layers(aoLayers, null, {position: 'topleft'}).addTo(oMap);
|
||||
$('#layers').empty().append($('.leaflet-control-layers-list .leaflet-control-layers-base'));
|
||||
|
||||
//Tracks, colors & popup
|
||||
//Actual Tracks: Track with corresponding colors
|
||||
var oActualTracks = L.geoJson(aoTracks, {
|
||||
style: function(oTrack) {
|
||||
return self.tmp(['track-type-styles', oTrack.properties.type]);
|
||||
}
|
||||
}).addTo(oMap);
|
||||
|
||||
//"Hover" Tracks: Wider track (thus hover area) to avoid flickering popups
|
||||
self.tmp('track', L.geoJson(aoTracks, {
|
||||
style: {weight: 20, opacity: 0},
|
||||
onEachFeature: function(feature, oLayer) {
|
||||
@@ -501,7 +504,7 @@ function initSpotMessages(aoMessages, aoTracks, bNoFeed) {
|
||||
asTrailMarkers.end.remove();
|
||||
});
|
||||
|
||||
(oElev.addData.bind(oElev))(feature, oLayer);
|
||||
if(!isIE() && !isMobile()) (oElev.addData.bind(oElev))(feature, oLayer);
|
||||
}
|
||||
}
|
||||
}).addTo(oMap));
|
||||
@@ -703,7 +706,7 @@ function getPost(asPost) {
|
||||
}
|
||||
|
||||
function getWmtsApiUrl(sMapId, iLat, iLng, iZoom) {
|
||||
return self.consts.geo_server+'/?a=tile&id='+sMapId+'&z='+iZoom+'&x='+iLng+'&y='+iLat;
|
||||
return self.consts.geo_server+'?a=tile&id='+sMapId+'&z='+iZoom+'&x='+iLng+'&y='+iLat;
|
||||
}
|
||||
|
||||
function getMediaLink(asData, sType) {
|
||||
|
||||
@@ -15,3 +15,4 @@
|
||||
* Fix lightbox portrait mode: push text under
|
||||
* Add mail frequency slider
|
||||
* Replace Project Time Zone with browser Time Zone when uploading media?
|
||||
* Improve elevation module perfs
|
||||
@@ -355,3 +355,13 @@ $.prototype.onSwipe = function(fCallBack){
|
||||
fCallBack({x:iDeltaX, y:iDeltaY});
|
||||
});
|
||||
};
|
||||
|
||||
function isIE() {
|
||||
var sUA = window.navigator.userAgent;
|
||||
//IE 10: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)
|
||||
//IE 11: Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko
|
||||
//Edge 12 (Spartan): Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0
|
||||
//Edge 13: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
|
||||
//Edge 18: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363
|
||||
return (sUA.indexOf('MSIE ') > 0 || sUA.indexOf('Trident/') > 0 || sUA.indexOf('Edge/') > 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user