Add key for Google Maps (Map of Science)
This commit is contained in:
parent
649b0cfd45
commit
f43db39084
3 changed files with 19 additions and 2 deletions
|
@ -11,6 +11,7 @@ import java.util.Set;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.QuerySolution;
|
import com.hp.hpl.jena.query.QuerySolution;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
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.RDFService;
|
||||||
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
|
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
|
||||||
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
|
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
|
||||||
|
@ -451,6 +452,13 @@ public class MapOfScienceVisualizationRequestHandler implements VisualizationReq
|
||||||
|
|
||||||
body.put("vivoDefaultNamespace", vreq.getWebappDaoFactory().getDefaultNamespace());
|
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);
|
return new TemplateResponseValues(standaloneTemplate, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,15 @@ VitroConnection.DataSource.validationQuery = SELECT 1
|
||||||
# OTHER OPTIONS
|
# 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
|
# AltMetric badges
|
||||||
# ----------------
|
# ----------------
|
||||||
# Options to embed AltMetric badges on information resource (e.g. journal article) pages
|
# Options to embed AltMetric badges on information resource (e.g. journal article) pages
|
||||||
|
|
|
@ -107,7 +107,7 @@ var i18nStrings = {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
${scripts.add('<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>',
|
${scripts.add('<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=${googleMapsKey}"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.blockUI.min.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.blockUI.min.js"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/datatable/1.7.6/jquery.dataTables.min.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/datatable/1.7.6/jquery.dataTables.min.js"></script>',
|
||||||
|
|
Loading…
Add table
Reference in a new issue