RT# 81730 - fixed XMLHttpRequest async issue, and fixed changed .gov api link.
[freeside.git] / httemplate / misc / xmlhttp-censustract.html
index 8a76860..985fb90 100644 (file)
@@ -6,7 +6,9 @@ my $DEBUG = 0;
 my $conf = new FS::Conf;
 
 my $return = {};
 my $conf = new FS::Conf;
 
 my $return = {};
-my $url = "http://data.fcc.gov/api/block/find?format=json&censusYear=" . $cgi->param('census_year') . "&latitude=" . $cgi->param('lat') . "&longitude=" . $cgi->param('lon');
+
+## new api link, see doc https://geo.fcc.gov/api/census/
+my $url = "https://geo.fcc.gov/api/census/block/find?format=json&censusYear=" . $cgi->param('census_year') . "&latitude=" . $cgi->param('lat') . "&longitude=" . $cgi->param('lon');
 
 use LWP::Simple;
 my $return = get $url;
 
 use LWP::Simple;
 my $return = get $url;