diff --git a/web/index.html b/web/index.html index 3e7e75bb..ba399cf9 100644 --- a/web/index.html +++ b/web/index.html @@ -15,9 +15,9 @@ - - + + diff --git a/web/js/map.js b/web/js/map.js index 9771c18c..f426cb67 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -40,6 +40,7 @@ DynMap.prototype = { inittime: new Date().getTime(), followingPlayer: '', missedupdates: 0, + canvassupport: !!document.createElement('canvas').getContext, formatUrl: function(name, options) { var url = this.options.url[name]; $.each(options, function(n,v) { @@ -126,7 +127,10 @@ DynMap.prototype = { me.maptype.updateTileSize(me.map.zoom); $(me).trigger('zoomchanged'); }; - + + if(me.canvassupport == false) + me.options.showplayerfacesinmenu = false; + /*google.maps.event.addListener(map, 'dragstart', function(mEvent) { me.followPlayer(null); });*/ diff --git a/web/js/playermarkers.js b/web/js/playermarkers.js index c3b30a55..fd621276 100644 --- a/web/js/playermarkers.js +++ b/web/js/playermarkers.js @@ -9,6 +9,10 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) { var markerPosition = dynmap.getProjection().fromLocationToLatLng(player.location); player.marker.setLatLng(markerPosition); + + // Only show player faces if canvas supported + if(dynmap.canvassupport == false) + configuration.showplayerfaces = false; $(div) .addClass('Marker') @@ -18,7 +22,7 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) { .append($('') .addClass(configuration.smallplayerfaces?'playerNameSm':'playerName') .text(player.name)); - + if (configuration.showplayerfaces) { if(configuration.smallplayerfaces) { getMinecraftHead(player.account, 16, function(head) {