text: // bike de boa style
  // (https://snazzymaps.com/style/90400/bike-de-boa)
  // window._gmapsCustomStyle = [ { "featureType": "all", "elementType": "labels.text", "stylers": [ { "visibility": "simplified" }, { "lightness": "36" } ] }, { "featureType": "administrative", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [ { "visibility": "on" }, { "hue": "#74ff00" }, { "lightness": "55" } ] }, { "featureType": "administrative", "elementType": "labels", "stylers": [ { "visibility": "on" }, { "color": "#777777" }, { "weight": "0.01" } ] }, { "featureType": "administrative.locality", "elementType": "labels", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [ { "lightness": "37" }, { "visibility": "on" } ] }, { "featureType": "landscape.man_made", "elementType": "all", "stylers": [ { "lightness": "51" } ] }, { "featureType": "landscape.natural", "elementType": "geometry", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.park", "elementType": "geometry.fill", "stylers": [ { "saturation": "-4" }, { "lightness": "35" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "visibility": "simplified" }, { "color": "#a05519" }, { "saturation": "-13" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit.station", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "visibility": "simplified" }, { "color": "#84afa3" }, { "lightness": 52 } ] }, { "featureType": "water", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "water", "elementType": "geometry.fill", "stylers": [ { "lightness": "37" }, { "saturation": "8" } ] } ];
  window._gmapsCustomStyle = [ { "featureType": "all", "elementType": "labels.text", "stylers": [ { "visibility": "simplified" }, { "lightness": "49" } ] }, { "featureType": "all", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [ { "visibility": "on" }, { "hue": "#74ff00" }, { "lightness": "55" } ] }, { "featureType": "administrative", "elementType": "labels", "stylers": [ { "visibility": "simplified" }, { "color": "#8c9388" } ] }, { "featureType": "administrative.locality", "elementType": "labels", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "lightness": "64" } ] }, { "featureType": "landscape", "elementType": "geometry.stroke", "stylers": [ { "lightness": "-8" } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "lightness": "70" }, { "saturation": "-28" } ] }, { "featureType": "poi", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.government", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.medical", "elementType": "geometry.fill", "stylers": [ { "lightness": "100" }, { "saturation": "-68" }, { "visibility": "off" } ] }, { "featureType": "poi.medical", "elementType": "geometry.stroke", "stylers": [ { "lightness": "-6" } ] }, { "featureType": "poi.place_of_worship", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.school", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.sports_complex", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "visibility": "simplified" }, { "color": "#a05519" }, { "saturation": "-13" } ] }, { "featureType": "road.local", "elementType": "geometry.fill", "stylers": [ { "lightness": "100" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit.station", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "visibility": "simplified" }, { "color": "#84afa3" }, { "lightness": "61" } ] }, { "featureType": "water", "elementType": "labels", "stylers": [ { "visibility": "off" } ] } ];
  
  // Just like the default one, but with POIs
  // window._gmapsCustomStyle_withLabels = [ { "featureType": "all", "elementType": "labels.text", "stylers": [ { "visibility": "simplified" }, { "lightness": "36" } ] }, { "featureType": "administrative", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [ { "visibility": "on" }, { "hue": "#74ff00" }, { "lightness": "55" } ] }, { "featureType": "administrative", "elementType": "labels", "stylers": [ { "visibility": "on" }, { "color": "#777777" }, { "weight": "0.01" } ] }, { "featureType": "administrative.locality", "elementType": "labels", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [ { "lightness": "37" }, { "visibility": "on" } ] }, { "featureType": "landscape.man_made", "elementType": "all", "stylers": [ { "lightness": "51" } ] }, { "featureType": "landscape.natural", "elementType": "geometry", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi.park", "elementType": "geometry.fill", "stylers": [ { "saturation": "-4" }, { "lightness": "35" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "visibility": "simplified" }, { "color": "#a05519" }, { "saturation": "-13" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit.station", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "visibility": "simplified" }, { "color": "#84afa3" }, { "lightness": 52 } ] }, { "featureType": "water", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "water", "elementType": "geometry.fill", "stylers": [ { "lightness": "37" }, { "saturation": "8" } ] } ];
  window._gmapsCustomStyle_withLabels = [ { "featureType": "all", "elementType": "labels.text", "stylers": [ { "visibility": "simplified" }, { "lightness": "49" } ] }, { "featureType": "all", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [ { "visibility": "on" }, { "hue": "#74ff00" }, { "lightness": "55" } ] }, { "featureType": "administrative", "elementType": "labels", "stylers": [ { "visibility": "simplified" }, { "color": "#8c9388" } ] }, { "featureType": "administrative.locality", "elementType": "labels", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "lightness": "70" }, { "saturation": "-28" } ] }, { "featureType": "poi", "elementType": "labels", "stylers": [ { "visibility": "on" } ] }, { "featureType": "poi.government", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.medical", "elementType": "geometry.fill", "stylers": [ { "lightness": "100" }, { "saturation": "-68" }, { "visibility": "off" } ] }, { "featureType": "poi.medical", "elementType": "geometry.stroke", "stylers": [ { "lightness": "-6" } ] }, { "featureType": "poi.place_of_worship", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.school", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.sports_complex", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "visibility": "simplified" }, { "color": "#a05519" }, { "saturation": "-13" } ] }, { "featureType": "road.local", "elementType": "geometry.fill", "stylers": [ { "lightness": "100" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit.station", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "visibility": "simplified" }, { "color": "#84afa3" }, { "lightness": "61" } ] }, { "featureType": "water", "elementType": "labels", "stylers": [ { "visibility": "off" } ] } ];
  
  window._gmapsCustomStyle_bikeLayerOptimized = [{"elementType": "labels.text", "stylers": [{"lightness": "36"}, {"visibility": "simplified"} ] }, {"featureType": "administrative", "stylers": [{"visibility": "off"} ] }, {"featureType": "administrative", "elementType": "labels", "stylers": [{"color": "#716464"}, {"visibility": "on"}, {"weight": "0.01"} ] }, {"featureType": "landscape", "stylers": [{"lightness": 50 } ] }, {"featureType": "landscape", "elementType": "geometry", "stylers": [{"lightness": 35 } ] }, {"featureType": "landscape.natural", "elementType": "geometry", "stylers": [{"visibility": "simplified"} ] }, {"featureType": "poi", "stylers": [{"visibility": "on"} ] }, {"featureType": "poi", "elementType": "labels", "stylers": [{"visibility": "off"} ] }, {"featureType": "poi.park", "elementType": "geometry.fill", "stylers": [{"saturation": "-4"}, {"lightness": "35"} ] }, {"featureType": "road", "stylers": [{"visibility": "on"} ] }, {"featureType": "road.highway", "stylers": [{"visibility": "off"} ] }, {"featureType": "road.highway", "elementType": "geometry", "stylers": [{"visibility": "on"} ] }, {"featureType": "road.highway", "elementType": "geometry.fill", "stylers": [{"visibility": "on"} ] }, {"featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [{"color": "#a05519"}, {"saturation": "-13"}, {"visibility": "simplified"} ] }, {"featureType": "road.local", "stylers": [{"lightness": -5 }, {"visibility": "on"} ] }, {"featureType": "transit", "stylers": [{"visibility": "simplified"} ] }, {"featureType": "transit", "elementType": "geometry", "stylers": [{"visibility": "simplified"} ] }, {"featureType": "transit.line", "stylers": [{"visibility": "off"} ] }, {"featureType": "transit.station", "elementType": "labels", "stylers": [{"visibility": "off"} ] }, {"featureType": "transit.station.bus", "stylers": [{"visibility": "off"} ] }, {"featureType": "water", "stylers": [{"color": "#84afa3"}, {"lightness": 52 }, {"visibility": "simplified"} ] }, {"featureType": "water", "elementType": "geometry", "stylers": [{"visibility": "on"} ] }, {"featureType": "water", "elementType": "geometry.fill", "stylers": [{"saturation": "8"}, {"lightness": "37"} ] } ];
  
  // Convert JSON gmaps style to URL version for the Static Maps API
  // thanks to: https://stackoverflow.com/questions/19115223/converting-google-maps-styles-array-to-google-static-maps-styles-string#
  function convertToStaticStyles(stylesArray) {
    var result = [];
    stylesArray.forEach(function(v, i, a){
      var style='';
      if (v.stylers.length > 0) { // Needs to have a style rule to be valid.
        style += (v.hasOwnProperty('featureType') ? 'feature:' + v.featureType : 'feature:all') + '|';
        style += (v.hasOwnProperty('elementType') ? 'element:' + v.elementType : 'element:all') + '|';
        v.stylers.forEach(function(val, i, a){
          var propertyname = Object.keys(val)[0];
          var propertyval = val[propertyname].toString().replace('#', '0x');
          style += propertyname + ':' + propertyval + '|';
        });
      }
      result.push('style='+encodeURIComponent(style));
    });
  
    return result.join('&');
  }
  
  window._gmapsCustomStyleStaticApi = convertToStaticStyles(_gmapsCustomStyle);