diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/visualization/mapofscience/MapOfScienceVisualizationRequestHandler.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/visualization/mapofscience/MapOfScienceVisualizationRequestHandler.java
index 4a5b8acd..b6b14ea7 100644
--- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/visualization/mapofscience/MapOfScienceVisualizationRequestHandler.java
+++ b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/visualization/mapofscience/MapOfScienceVisualizationRequestHandler.java
@@ -11,6 +11,7 @@ import java.util.Set;
import com.hp.hpl.jena.query.QuerySolution;
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
+import edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
@@ -450,7 +451,14 @@ public class MapOfScienceVisualizationRequestHandler implements VisualizationReq
body.put("vivoDefaultNamespace", vreq.getWebappDaoFactory().getDefaultNamespace());
-
+
+ ConfigurationProperties properties = ConfigurationProperties.getBean(vreq);
+ if (properties != null) {
+ body.put("googleMapsKey", properties.getProperty("google.maps.key", "AIzaSyCAexrHLqAu6Rb18DWqwrb-vx1PQQFkAQA"));
+ } else {
+ body.put("googleMapsKey", "AIzaSyCAexrHLqAu6Rb18DWqwrb-vx1PQQFkAQA");
+ }
+
return new TemplateResponseValues(standaloneTemplate, body);
}
diff --git a/home/src/main/resources/config/example.runtime.properties b/home/src/main/resources/config/example.runtime.properties
index cbf83877..0a2dea38 100644
--- a/home/src/main/resources/config/example.runtime.properties
+++ b/home/src/main/resources/config/example.runtime.properties
@@ -217,6 +217,15 @@ VitroConnection.DataSource.validationQuery = SELECT 1
# OTHER OPTIONS
# -----------------------------------------------------------------------------
+ # Google Maps Key
+ # ---------------
+ # To use the Google Maps (e.g. Map of Science), you need to have a key for Google Maps
+ # See https://developers.google.com/maps/documentation/javascript/get-api-key
+ #
+ # When you have a key, uncomment the line below and add it here
+
+#google.maps.key=
+
# AltMetric badges
# ----------------
# Options to embed AltMetric badges on information resource (e.g. journal article) pages
diff --git a/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl b/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl
index 06ee8ac9..7bcfb634 100644
--- a/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl
+++ b/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl
@@ -107,7 +107,7 @@ var i18nStrings = {
};
-${scripts.add('',
+${scripts.add('',
'',
'',
'',