[freeside-commits] branch master updated. 9c0a696b7999d2fdb3a16f5860770d2b004c82b5
Mitch Jackson
mitch at freeside.biz
Wed Aug 22 11:16:32 PDT 2018
The branch, master has been updated
via 9c0a696b7999d2fdb3a16f5860770d2b004c82b5 (commit)
from 8a562e60b379ea7921db76d4c64a4a4ce576ce86 (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 9c0a696b7999d2fdb3a16f5860770d2b004c82b5
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