This sample uses the geodesicBufferOperator to create geodesic buffers around the pointer (mouse/touch) location as a user moves the pointer across the view.
Geodesic buffers account for the earth’s curvature, resulting in more accurate representations, especially when viewed in 3D and over large areas. On a 2D Web Mercator map, the geodesic buffers appear increasingly distorted as they are drawn farther from the equator. This happens because the shortest path on a globe is not a straight line when represented on a flat map. This distortion is unavoidable when projecting a sphere onto a flat surface, leading to stretching and shearing.
In comparison. planar buffers are best for viewing smaller geographic areas. The shape of planar buffers won't distort on 2D Web Mercator map, but their size and areas will be increasingly inaccurate as they move away from the equator. In the 3D view, the size of planar buffers will be largest at the equator and smaller the closer they get to the poles.
How it works
The sample listens to arcgis and arcgis events both on the Map and Scene instances. If the b key is tapped, a user can click on or move the pointer around both views to create a geodesic buffer around the pointer location.
viewElementMap.addEventListener("arcgisViewPointerMove", (event) => {
if (bufferEnabled) {
createBuffer(event.detail, viewElementMap.view);
}
});


