n,o not in the config.
u need to edit the js file (MMM-GoogleMapsTraffic.js)
if u want just replace ur js with the code i use
/* global Module */
/* Magic Mirror
* Module: MMM-GoogleMapsTraffic
*
* By Victor Mora
* MIT Licensed.
*/
Module.register("MMM-GoogleMapsTraffic", {
// Module config defaults
defaults : {
lat: '',
lng: '',
height: '300px',
width: '300px',
zoom: 10,
mapTypeId: 'roadmap',
disableDefaultUI: true
},
getDom: function() {
var lat = this.config.lat;
var lng = this.config.lng;
var wrapper = document.createElement("div");
wrapper.setAttribute("id", "map");
wrapper.style.height = this.config.height;
wrapper.style.width = this.config.width;
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://maps.googleapis.com/maps/api/js?key=" + this.config.key;
document.body.appendChild(script);
var self = this;
script.onload = function () {
var map = new google.maps.Map(document.getElementById("map"), {
zoom: self.config.zoom,
mapTypeId: self.config.mapTypeId,
center: {
lat: self.config.lat,
lng: self.config.lng
},
//disableDefaultUI: self.config.disableDefaultUI
disableDefaultUI: true,
styles: [
{elementType: 'geometry', stylers: [{color: '#242f3e'}]},
{elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},
{elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},
{
featureType: 'administrative.locality',
elementType: 'labels.text.fill',
stylers: [{color: '#d59563'}]
},
{
featureType: 'poi',
elementType: 'labels.text.fill',
stylers: [{color: '#d59563'}]
},
{
featureType: 'poi.park',
elementType: 'geometry',
stylers: [{color: '#263c3f'}]
},
{
featureType: 'poi.park',
elementType: 'labels.text.fill',
stylers: [{color: '#6b9a76'}]
},
{
featureType: 'road',
elementType: 'geometry',
stylers: [{color: '#38414e'}]
},
{
featureType: 'road',
elementType: 'geometry.stroke',
stylers: [{color: '#212a37'}]
},
{
featureType: 'road',
elementType: 'labels.text.fill',
stylers: [{color: '#9ca5b3'}]
},
{
featureType: 'road.highway',
elementType: 'geometry',
stylers: [{color: '#746855'}]
},
{
featureType: 'road.highway',
elementType: 'geometry.stroke',
stylers: [{color: '#1f2835'}]
},
{
featureType: 'road.highway',
elementType: 'labels.text.fill',
stylers: [{color: '#f3d19c'}]
},
{
featureType: 'transit',
elementType: 'geometry',
stylers: [{color: '#2f3948'}]
},
{
featureType: 'transit.station',
elementType: 'labels.text.fill',
stylers: [{color: '#d59563'}]
},
{
featureType: 'water',
elementType: 'geometry',
stylers: [{color: '#17263c'}]
},
{
featureType: 'water',
elementType: 'labels.text.fill',
stylers: [{color: '#515c6d'}]
},
{
featureType: 'water',
elementType: 'labels.text.stroke',
stylers: [{color: '#17263c'}]
}
]
});
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map);
};
return wrapper;
}
});