Only use Google Maps API key if configured
This commit is contained in:
parent
2ca805b4ff
commit
6881257f57
2 changed files with 10 additions and 5 deletions
|
@ -454,9 +454,10 @@ public class MapOfScienceVisualizationRequestHandler implements VisualizationReq
|
|||
|
||||
ConfigurationProperties properties = ConfigurationProperties.getBean(vreq);
|
||||
if (properties != null) {
|
||||
body.put("googleMapsKey", properties.getProperty("google.maps.key", "AIzaSyCAexrHLqAu6Rb18DWqwrb-vx1PQQFkAQA"));
|
||||
} else {
|
||||
body.put("googleMapsKey", "AIzaSyCAexrHLqAu6Rb18DWqwrb-vx1PQQFkAQA");
|
||||
String key = properties.getProperty("google.maps.key");
|
||||
if (!StringUtils.isEmpty(key)) {
|
||||
body.put("googleMapsKey", key);
|
||||
}
|
||||
}
|
||||
|
||||
return new TemplateResponseValues(standaloneTemplate, body);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue