Skip to content
Snippets Groups Projects
Commit d0aa7f90 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Handle GeoJson with no features

parent 9c8061ad
No related branches found
No related tags found
2 merge requests!13Saddlegallmidge form idec 372,!12feat: Add test page (spatial) with mapserver layer in openlayers map
......@@ -395,7 +395,7 @@ async function initDataSourceMap(containerId, geoJson, countryCodeList, featureC
}
// If no data, no map
if((geoJson == undefined || geoJson == null || geoJson.features.length == 0) && (countryCodeList == null || countryCodeList.length == 0))
if((geoJson == undefined || geoJson == null || geoJson.features == undefined || geoJson.features.length == 0) && (countryCodeList == null || countryCodeList.length == 0))
{
document.getElementById(containerId).innerHTML = "NO GEODATA PROVIDED BY WEATHER DATA SOURCE";
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment