From d283f5483c07427a0988975ac913a96f68d56a5d Mon Sep 17 00:00:00 2001
From: prasad <prasad@vtiger.com>
Date: Thu, 22 Mar 2018 10:37:00 +0530
Subject: [PATCH] Fixes #931: Added placeholder to inject Google maps API Key

---
 .../Google/layouts/v7/modules/Google/resources/Map.js     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pkg/vtiger/modules/Google/layouts/v7/modules/Google/resources/Map.js b/pkg/vtiger/modules/Google/layouts/v7/modules/Google/resources/Map.js
index a2a98d74e..9419061e0 100644
--- a/pkg/vtiger/modules/Google/layouts/v7/modules/Google/resources/Map.js
+++ b/pkg/vtiger/modules/Google/layouts/v7/modules/Google/resources/Map.js
@@ -41,7 +41,11 @@ Vtiger.Class("Google_Map_Js", {}, {
 	},
 
 	loadMapScript : function() {
-			jQuery.getScript("https://maps.google.com/maps/api/js?sensor=true&async=2&callback=initialize", function () {});
+			var API_KEY = 'YOUR_MAP_API_KEY'; // CONFIGURE THIS 
+
+			if (API_KEY == 'YOUR_MAP_API_KEY' && typeof console) console.error("Google Map API Key not configured."); 
+
+			jQuery.getScript("https://maps.google.com/maps/api/js?key=" + API_KEY + "&sensor=true&async=2&callback=initialize", function () {});
 	},
 
 	getQueryString : function (address) {
@@ -81,4 +85,4 @@ function initialize(){
 			}
 		});
   }
-}
\ No newline at end of file
+}
-- 
GitLab