code: function(elem, opacity, animDuration) {
              var self = this;
  
              // Ensure no animation is running
              //elem.mapElem.stop();
              //if (elem.textElem) elem.textElem.stop();
  
              // If final opacity is not null, ensure element is shown before proceeding
              if (opacity > 0) {
                  elem.mapElem.show();
                  if (elem.textElem) elem.textElem.show();
              }
  
              self.animate(elem.mapElem, {"opacity": opacity}, animDuration, function () {
                  // If final attribute is 0, hide
                  if (opacity === 0) elem.mapElem.hide();
              });
  
              self.animate(elem.textElem, {"opacity": opacity}, animDuration, function () {
                  // If final attribute is 0, hide
                  if (opacity === 0) elem.textElem.hide();
              });
          }
docs: /*
  Set element opacity
  Handle elem.mapElem and elem.textElem
  @param elem the element
  @param opacity the opacity to apply
  @param animDuration the animation duration to use