";
for (let ecoregion of level3Eco) {
items.innerHTML += `
${ecoregion.name}
`;
}
div.insertAdjacentHTML(
"beforeend",
""
);
return div;
};
//requested that legend be hidden, so it's commented out
// level3legend.addTo(map);
// if (params.eco3Show !== true && params.eco4Show !== true) {
// const legend = document.querySelector(".legend-items");
// legend.style.display = "none";
// }
}
/*
*eco3Load* will load the level 3 ecoregion data. Must be TRUE in order for eco3Show to work.
*eco3Show* will automatically populate the map with the level 3 ecoregions. If not selected, the ecoregions & legend will load, but will be toggled off & minimized respectively.
*/
if (params.eco3Load === true) {
//initialize ecoregion layer
const level3Layer = new L.layerGroup();
//add loading spinner while ecoregions load
document.querySelector("#ecoregion_map").insertAdjacentHTML(
"afterend",
`
Level 3 Ecoregions Loading
`
);
const loadLevel3Ecos = async () => {
const promises = [];
for (let eco of level3Eco) {
try {
let res = await fetch(
`https://geodata.epa.gov/arcgis/rest/services/ORD/USEPA_Ecoregions_Level_III_and_IV/MapServer/11/query?where=US_L3CODE+%3D+%27${eco.id}%27&f=geojson`
);
let json = await res.json();
//add ecoregion name so it can be bound to tooltip
json.name = eco.name;
json.style = eco.style;
json.info = eco.info;
promises.push(json);
} catch (error) {
console.log(error);
}
}
Promise.all(promises).then((res) => {
document.querySelector(".spinner-container").hidden = true;
document.querySelector("#level-3-loading").style.display = "none";
for (let ecoregion of res) {
L.geoJSON(ecoregion, {
className: "l3-layer-overlay",
fillOpacity: 0.2,
weight: 1,
color: ecoregion.style,
})
//TODO currently uses unsplash filler images, needs to be updated in future with actual ecoregion pictures
.bindTooltip(ecoregion.name, { className: "ecoregion-popup" })
.on("click", function (e) {
l3sidebar.setContent(`
${ecoregion.name}
Level 3 Ecoregion
${ecoregion.info}
Reference: Griffith, Bryce, Omernick & Rodgers (2007). Ecoregions of Texas.`);
l3sidebar.show();
})
.addTo(level3Layer);
}
//add the layer to the map
if (params.eco3Show === true) {
map.addLayer(level3Layer);
}
//add layer to overlay so it can be toggled
layerControl.addOverlay(level3Layer, "Level 3 Ecoregions");
});
};
loadLevel3Ecos();
//initialize sidebar
const l3sidebar = L.control.sidebar("l3sidebar", {
position: "left",
});
//add controls to sidebar
map.addControl(l3sidebar);
}
/*
*eco4Load* will load the level 3 ecoregion data. Must be TRUE in order for eco4Show to work.
*eco4Show* will automatically populate the map with the level 4 ecoregions. If not selected, the ecoregions & legend (for level 3 ecoregions) will load, but will be toggled off & minimized respectively.
*/
if (params.eco4Load === true) {
//initialize ecoregion layer
const level4Layer = new L.layerGroup();
//add loading spinner while ecoregions load
document.querySelector("#ecoregion_map").insertAdjacentHTML(
"afterend",
`
Level 4 Ecoregions Loading
`
);
const loadLevel4Ecos = async () => {
const lvl4Promises = [];
for (let eco of level4Eco) {
try {
let res = await fetch(
`https://geodata.epa.gov/arcgis/rest/services/ORD/USEPA_Ecoregions_Level_III_and_IV/MapServer/7/query?where=US_L4CODE+%3D+%27${eco.id}%27&f=geojson`
);
let json = await res.json();
//add ecoregion name so it can be bound to tooltip
json.name = eco.name;
json.style = eco.style;
json.info = eco.info;
lvl4Promises.push(json);
} catch (error) {
console.log(error);
}
}
Promise.all(lvl4Promises).then((res) => {
if (params.eco3Load === false && params.eco4Load === true) {
document.querySelector(".spinner-container").hidden = true;
}
document.querySelector("#level-4-loading").style.display = "none";
for (let ecoregion of res) {
L.geoJSON(ecoregion, {
className: "l4-layer-overlay",
fillOpacity: 0.4,
weight: 1,
color: ecoregion.style,
})
//TODO currently uses unsplash filler images, needs to be updated in future with actual ecoregion pictures
.bindTooltip(ecoregion.name, { className: "ecoregion-popup" })
.on("click", function (e) {
l4sidebar.setContent(`
${ecoregion.name}
Level 4 Ecoregion
${ecoregion.info}
Reference: Griffith, Bryce, Omernick & Rodgers (2007). Ecoregions of Texas.`);
l4sidebar.show();
})
.addTo(level4Layer);
}
if (params.eco4Show === true) {
//add the layer to the map
map.addLayer(level4Layer);
}
//add layer to overlay so it can be toggled
layerControl.addOverlay(level4Layer, "Level 4 Ecoregions");
});
};
loadLevel4Ecos();
const l4sidebar = L.control.sidebar("l4sidebar", {
position: "right",
});
map.addControl(l4sidebar);
}
/*
*chapterLoad* will load the chapter location pins & chapter counties to create a "heatmap". Must be TRUE in order for chapterShow to work.
*chapterShow* will automatically populate the map with the chapter location pins & chapter counties. If not selected, the chapter location pins & chapter counties will load but will be toggled off.
*/
if (params.chapterLoad === true) {
const loadChapters = async () => {
const chapterOptions = { ...iconOptions };
chapterOptions.borderColor = "#3c5799";
chapterOptions.textColor = "#3c5799";
chapterOptions.icon = "users";
//initialize layer for chapter pins
const chapterPins = new L.LayerGroup();
//initialize layer for chapter counties
const chapterCounties = new L.LayerGroup();
//storage for chapter counties
const countyArr = [];
//add loading spinner while ecoregions load
document.querySelector("#ecoregion_map").insertAdjacentHTML(
"afterend",
`
Botanists say that Texas is home to over 7,000 species of vascular plants, including native, naturalized, non-native, crop and forage, and introduced perennial ornamental species. Nearly 5,000 of these are said to be native plants. What does “native plant” mean? It’s difficult to find a definitive answer to that question.
Several friends have expressed their opinion that “native plant” means plants that were growing naturally here when the European settlers came. This is the tacit definition many botanists and native-plant enthusiasts seem to use.
Ratibida columnifera (Mexican hat) (photo Bill Hopkins)
Plants that were introduced by man during the last three hundred or so years and that have adapted to our landscape and climate are referred to as “naturalized.” An example of this in Texas is the black locust (Robinia pseudoacacia), originally native to the northeastern US, but now prevalent in Gulf Coast states, where it was introduced by nurserymen. Those aggressive naturalized plants that are detrimental to the health of native-plant populations commonly are called “invasive exotics” and “noxious weeds.” Chinese tallow (Sapium sebiferum) and Japanese honeysuckle (Lonicera japonica) are notorious examples of highly proliferating exotic species.
The U.S. Department of Agriculture definition of “native plant” is “a plant that lives or grows naturally in a particular region without direct or indirect human intervention.” That definition also might apply to many “naturalized” plants that were introduced long ago, but are now thriving and spreading without human intervention. For example, common mullein (Verbascum thapsus) and common horehound (Marrubium vulgare) were introduced by early European settlers, but are now so widespread in open fields across the Hill Country that many people think they are Texas natives. Lee Dittman, writing for Northern Arizona Flora, advocates that “a native species is best defined as one which has inhabited a particular region for thousands of years.” I like this definition because it allows inclusion of plants which might have been brought from Asia by early ancestors of Native Americans. After thousands of years, such plants would have evolved to occupy a certain niche in their ecosystem and probably are indistinguishable from the “original” native plants with which they now grow.
From my perspective as a geologist, I might define Texas natives as descendants of those plants which were growing naturally in this state at the beginning of the Holocene (Recent) Epoch, which began about 8,000- 10,000 years ago, just after the last Ice Age. Of course, it might be difficult to tell if these include naturalized exotic plants introduced by ancient Asian peoples who migrated to the American continents during the last glacial period (Ice Age).
The native-plant movement has its supporters who are quite restrictive in what they call a native plant. Texas is such a big state that a plant growing in one part of the state can not necessarily be considered native to another part of the state. “Texas native” covers a wide realm of different vegetation types. When the Native Plant Society of Texas allocates funds for chapter demonstration gardens, one requirement is that all plants used must be native to the area within a 50-mile radius of the garden. Bill Neiman found that even the same species of prairie grass from one part of Texas should not be considered native to another part of Texas. When he took grass from a South Texas prairie to help supplement that same species in a Central Texas prairie, the southern species acted like an invasive exotic and began to aggressively crowd out other grasses with which the northern variety of the species ordinarily coexists.
In planting my own “native plant yard,” I like to be a regionalist. My “native region” includes Central and Southwest Texas as well as northeastern Mexico. This might not please a purist, but it allows me to grow a variety of attractive and interesting native plants. For example, I would hate to do without all those Mexican salvias. Anyway, the almost-native plants I use are not likely to invade the local countryside, and they require minimal watering.