const layers = map.getLayers().getArray();
layers.forEach((layer) => {
const source = layer.getSource();
if (source && source.dispose) {
source.clear();
source.dispose();
}
if (layer.disposeInternal) {
layer.disposeInternal();
} else if (layer.dispose) {
layer.dispose();
}
map.removeLayer(layer);
});
const olCanvas = map.getViewport().querySelector("canvas");
if (olCanvas) {
const gl = olCanvas.getContext("webgl") || olCanvas.getContext("webgl2");
if (gl) {
const loseContext = gl.getExtension("WEBGL_lose_context");
if (loseContext) {
loseContext.loseContext();
}
}
}
map.getInteractions().clear();
map.getOverlays().clear();
map.dispose();
map.setTarget(null);
I originally created this site to be a simple web 2.0 blog site with text entries for thoughts that...
Journal | Read More →Generate Colorized 3D Tiles from LiDAR and Ortho Imagery
Tech Blog | Read More →Using whisper and AI to transcribe audio and generate thematic clips
Journal | Read More →Bearing, LineIntersect & Destination
Tech Blog | Read More →Rendering Comparisons of Vector Tiles and COGs in Web Mapping Libraries
Tech Blog | Read More →Using SQLite in the Browser and Service Workers to Power Web Maps from Object Storage
Tech Blog | Read More →folk songs
A NodeJS GTFS Feed & Interactive Map Generator
Tech Blog | Read More →An Exporation of the Highest Mountain Peaks in the US
Tech Blog | Read More →Query > Download > Copy > Paste!
Tech Blog | Read More →Creating Cloud Optimized GeoTIFFs and Raster Tiles using GDAL and QGIS
Tech Blog | Read More →TL;DR gdalbuildvrt, gdal_translate, gdal_warp and gdaladdo
Tech Blog | Read More →What if all US COVID Deaths occurred in one geographic area?
Tech Blog | Read More →A Presentation for the 2020 Virtual Ohio GIS Conference
Tech Blog | Read More →folk songs
Using NodeJS and Batches to Transform an ArcGIS Online Feature Service to GeoJSON
Tech Blog | Read More →A Simple, Client Side Tracking Dashboard for COVID-19 in Ohio
Tech Blog | Read More →A Comparison of Filter and Feature-State
Tech Blog | Read More →A Client Side Solution for Simple Upstream and Downstream Linear Network Analysis
Tech Blog | Read More →A Leaflet Version of the Original Mapbox JS Store Locator Example
Tech Blog | Read More →A Locator Map with Search and Nearest Store Finder
Tech Blog | Read More →folk songs
folk songs
One Hundred Years of Urban Growth in Ten Seconds
Tech Blog | Read More →veil
veil
veil
veil
veil