diff --git a/web/js/map.js b/web/js/map.js index bb5b18ac..fe978e1f 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -302,11 +302,11 @@ DynMap.prototype = { $(me).trigger('mapchanging'); var mapWorld = map.options.world; if (me.maptype) { - $('.compass').removeClass('compass_' + me.maptype.compassview); - $('.compass').removeClass('compass_' + me.maptype.name); + $('.compass').removeClass('compass_' + me.maptype.options.compassview); + $('.compass').removeClass('compass_' + me.maptype.options.name); } - $('.compass').addClass('compass_' + map.compassview); - $('.compass').addClass('compass_' + map.name); + $('.compass').addClass('compass_' + map.options.compassview); + $('.compass').addClass('compass_' + map.options.name); var worldChanged = me.world !== map.options.world; var projectionChanged = (me.maptype && me.maptype.getProjection()) !== (map && map.projection);