concise handling of cors urls

This commit is contained in:
Matt Walsh
2020-09-24 19:51:29 -05:00
parent 34e7775838
commit e8c7dfa6a7
3 changed files with 21 additions and 8 deletions

View File

@@ -53,12 +53,12 @@ class Radar extends WeatherDisplay {
if (weatherParameters.State === 'HI') src = 'images/HawaiiRadarMap2.png';
this.baseMap = await utils.image.load(src);
const baseUrl = 'Conus/RadarImg/';
const baseUrl = 'https://radar.weather.gov/Conus/RadarImg/';
let radarHtml;
try {
// get a list of available radars
radarHtml = await $.ajax({
radarHtml = await $.ajaxCORS({
type: 'GET',
url: baseUrl,
dataType: 'text',