summaryrefslogtreecommitdiff
path: root/httemplate/elements
diff options
context:
space:
mode:
authorMitch Jackson <mitch@freeside.biz>2018-08-22 14:14:30 -0400
committerMitch Jackson <mitch@freeside.biz>2018-08-22 14:14:30 -0400
commit9c0a696b7999d2fdb3a16f5860770d2b004c82b5 (patch)
treede9150d68791450b8c62a6817da7cec36104aaa3 /httemplate/elements
parent8a562e60b379ea7921db76d4c64a4a4ce576ce86 (diff)
RT# 81150 Google now requires api key for drawing api
Diffstat (limited to 'httemplate/elements')
-rw-r--r--httemplate/elements/polygon.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/httemplate/elements/polygon.html b/httemplate/elements/polygon.html
index 469ae7f..a0d380b 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">&nbsp;</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;