[freeside-commits] branch master updated. 12ac7af853e51693f1bc7e49669974b9cd54e9bb
Christopher Burger
burgerc at freeside.biz
Fri Nov 16 08:15:04 PST 2018
The branch, master has been updated
via 12ac7af853e51693f1bc7e49669974b9cd54e9bb (commit)
from e91621d2c95ba5662958ee24946bb9324ee41b72 (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 12ac7af853e51693f1bc7e49669974b9cd54e9bb
Author: Christopher Burger <burgerc at freeside.biz>
Date: Fri Nov 16 11:14:32 2018 -0500
RT# 81730 - added code to fix possible cross origin request error
diff --git a/httemplate/misc/openmap.html b/httemplate/misc/openmap.html
index 7cbe3db1d..88f64c1ff 100644
--- a/httemplate/misc/openmap.html
+++ b/httemplate/misc/openmap.html
@@ -18,7 +18,7 @@
<script>
- var url = 'http://nominatim.openstreetmap.org/search?format=json&limit=1&q=<%$loc%>';
+ var url = 'xmlhttp-openstreetmap.html?loc=<%$loc%>';
$.getJSON(url,function(data){
var latlong = [data[0].lat, data[0].lon];
var mymap = L.map('mapid').setView(latlong, 15);
diff --git a/httemplate/misc/xmlhttp-openstreetmap.html b/httemplate/misc/xmlhttp-openstreetmap.html
new file mode 100644
index 000000000..bf6625c93
--- /dev/null
+++ b/httemplate/misc/xmlhttp-openstreetmap.html
@@ -0,0 +1,15 @@
+<% $return %>\
+<%init>
+
+my $DEBUG = 0;
+
+my $conf = new FS::Conf;
+
+my $return = {};
+
+my $url = "http://nominatim.openstreetmap.org/search?format=json&limit=1&q=" . $cgi->param('loc');
+
+use LWP::Simple;
+my $return = get $url;
+
+</%init>
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
httemplate/misc/openmap.html | 2 +-
httemplate/misc/xmlhttp-openstreetmap.html | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
create mode 100644 httemplate/misc/xmlhttp-openstreetmap.html
More information about the freeside-commits
mailing list