[freeside-commits] branch FREESIDE_4_BRANCH updated. 052866cc1a6f486f2522641a5b94f6e5526c6c19
Mitch Jackson
mitch at freeside.biz
Wed Aug 22 11:36:38 PDT 2018
The branch, FREESIDE_4_BRANCH has been updated
via 052866cc1a6f486f2522641a5b94f6e5526c6c19 (commit)
from f39e443ac725b70b721fecf6bd53e3df4a502d94 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 052866cc1a6f486f2522641a5b94f6e5526c6c19
Author: Mitch Jackson <mitch at freeside.biz>
Date: Wed Aug 22 14:14:30 2018 -0400
RT# 81150 Google now requires api key for drawing api
diff --git a/httemplate/elements/polygon.html b/httemplate/elements/polygon.html
index 469ae7f13..a0d380bb8 100644
--- a/httemplate/elements/polygon.html
+++ b/httemplate/elements/polygon.html
@@ -5,12 +5,15 @@ my $id = $opt{'id'} || $opt{'field'};
my $div_id = "div_$id";
my $vertices_json = $opt{'curr_value'} || '[]';
+
+my $apikey = FS::Conf->new->config('google_maps_api_key');
+
</%init>
<& hidden.html, %opt &>
<div id="<% $div_id %>" style="height: 600px; width: 600px"></div>
<div id="<% $div_id %>_hint" style="width: 100%; border: 2px solid black; text-align: center; box-sizing: border-box; padding: 4px"> </div>
-<script src="https://maps.googleapis.com/maps/api/js?libraries=drawing&v=3.22"></script>
+<script src="https://maps.googleapis.com/maps/api/js?libraries=drawing&v=3.22<% $apikey ? "&key=$apikey" : '' %>"></script>
<script>
var map;
var drawingManager;
-----------------------------------------------------------------------
Summary of changes:
httemplate/elements/polygon.html | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list