Don't let a missing markers.js or region.js foul up everything
Fixes #330
This commit is contained in:
@@ -211,6 +211,7 @@ function drawMapControls() {
|
|||||||
// parse the data as definned in the regions.js
|
// parse the data as definned in the regions.js
|
||||||
function initRegions() {
|
function initRegions() {
|
||||||
if (regionsInit) { return; }
|
if (regionsInit) { return; }
|
||||||
|
if (typeof(regionData) == "undefined") { return; } // skip this if we have no region.js file
|
||||||
regionsInit = true;
|
regionsInit = true;
|
||||||
|
|
||||||
for (i in regionGroups) {
|
for (i in regionGroups) {
|
||||||
@@ -295,6 +296,7 @@ function initRegions() {
|
|||||||
// may need to be reviewed by agrif or someone else... little finicky right now.
|
// may need to be reviewed by agrif or someone else... little finicky right now.
|
||||||
function initMarkers() {
|
function initMarkers() {
|
||||||
if (markersInit) { return; } // oh, we've already done this? nevermind, exit the function.
|
if (markersInit) { return; } // oh, we've already done this? nevermind, exit the function.
|
||||||
|
if (typeof(markerData) == "undefined") { return; } // no markers.js file, so skip this.
|
||||||
markersInit = true; // now that we've started, dont have to do it twice.
|
markersInit = true; // now that we've started, dont have to do it twice.
|
||||||
|
|
||||||
// first, give all collections an empty array to work with
|
// first, give all collections an empty array to work with
|
||||||
|
|||||||
Reference in New Issue
Block a user