projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cust_main fields only
[freeside.git]
/
httemplate
/
view
/
map.html
diff --git
a/httemplate/view/map.html
b/httemplate/view/map.html
index
3122de6
..
01ffc6d
100644
(file)
--- a/
httemplate/view/map.html
+++ b/
httemplate/view/map.html
@@
-22,14
+22,20
@@
body { height: 100%; margin: 0px; padding: 0px }
@media print { #map_canvas { height: 500px; margin: 0; } }
</style>
@media print { #map_canvas { height: 500px; margin: 0; } }
</style>
-<script type="text/javascript"
-src="https://maps.google.com/maps/api/js?v=3.4&sensor=false">
+<script type="text/javascript" src="https://maps.google.com/maps/api/js?v=3<% $apikey ? '&key='.$apikey : '' %>">
</script>
<script type="text/javascript">
var lengthLine=0;
var map;
</script>
<script type="text/javascript">
var lengthLine=0;
var map;
+// function name specified by google maps api, special hook for auth errors
+function gm_authFailure () {
+ document.body.innerHTML =
+<% include('/elements/google_maps_api_key.html', autherror => $apikey ) |js_string%>;
+}
+
+
function initialize() {
var latlng = new google.maps.LatLng(<%$lat%>, <%$lon%>);
var myOptions = {
function initialize() {
var latlng = new google.maps.LatLng(<%$lat%>, <%$lon%>);
var myOptions = {
@@
-56,6
+62,8
@@
function initialize() {
</%def>
<%shared>
my ($lat, $lon, $name);
</%def>
<%shared>
my ($lat, $lon, $name);
+my $conf = new FS::Conf;
+my $apikey = $conf->config('google_maps_api_key');
</%shared>
<%init>
</%shared>
<%init>