Fire event for Google Maps authentication error
authorMatthias Schmidt <gravatronics@live.com>
Sat, 3 Feb 2018 08:12:06 +0000 (09:12 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 3 Feb 2018 08:12:06 +0000 (09:12 +0100)
Close #2526

wcfsetup/install/files/js/WCF.Location.js

index 3d9ac3820146880f89070d9954b52b5954fff426..4b7008ef214aa9860ffa82124534bd3105f290f8 100644 (file)
@@ -43,6 +43,14 @@ WCF.Location.Util = {
  */
 WCF.Location.GoogleMaps = { };
 
+/**
+ * After an authentican error, Google Maps tries to call the `gm_authFailure` function.
+ * (see https://developers.google.com/maps/documentation/javascript/events#auth-errors)
+ */
+function gm_authFailure() {
+       WCF.System.Event.fireEvent('com.woltlab.wcf.googleMaps', 'authenticationFailure');
+};
+
 /**
  * Handles the global Google Maps settings.
  */