     return tgViewController.view as! GLKView
   }
 
-  /// The height of our enclosing tab bar controller's tab bar.
-  open var tabBarHeight : CGFloat {
-    return self.tabBarController?.tabBar.frame.height ?? 0
+  /// The height of our enclosing tab bar controller's tab bar if it is translucent.
+  open var tabBarOffset : CGFloat {
+    guard let tabBar = self.tabBarController?.tabBar else { return 0 }
+    return tabBar.isTranslucent ? tabBar.frame.height : 0
   }
 
   /**

    tgViewController.mapViewDelegate = self
  }

  override open func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
    super.viewWillTransition(to: size, with: coordinator)
    let adjustedSize = CGSize(width: size.width, height: size.height-tabBarHeight)
    tgViewController.viewWillTransition(to: adjustedSize, with:coordinator)
  }

  //MARK: - LocationManagerDelegate

  open func locationDidUpdate(_ location: CLLocation) {

    attributionBtn.translatesAutoresizingMaskIntoConstraints = false
    mapView.addSubview(attributionBtn)

    let bottomOffset = -Dimensions.defaultPadding - tabBarOffset
    let horizontalConstraint = attributionBtn.leftAnchor.constraint(equalTo: mapView.leftAnchor, constant: Dimensions.defaultPadding)
    let verticalConstraint = attributionBtn.bottomAnchor.constraint(equalTo: mapView.bottomAnchor, constant: bottomOffset)
    NSLayoutConstraint.activate([horizontalConstraint, verticalConstraint])
  }

