mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-16 16:45:22 +00:00
Uint8Array is widely available (#9788)
This commit is contained in:
@ -53,9 +53,7 @@ export function closestPointOnSegment(p, p1, p2) {
|
||||
function _simplifyDP(points, sqTolerance) {
|
||||
|
||||
const len = points.length,
|
||||
ArrayConstructor = typeof Uint8Array !== `${undefined}` ? Uint8Array : Array,
|
||||
markers = new ArrayConstructor(len);
|
||||
|
||||
markers = new Uint8Array(len);
|
||||
markers[0] = markers[len - 1] = 1;
|
||||
|
||||
_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);
|
||||
|
Reference in New Issue
Block a user