Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function project(x, y, scale, line, extent) {
const sizeToPixel = extent / TILE_SIZE;
for (let ii = 0; ii < line.length; ii++) {
const p = line[ii];
// LNGLAT
line[ii] = worldToLngLat([x + p[0] / sizeToPixel, y + p[1] / sizeToPixel], scale);
}
}
function project(x, y, scale, line, extent) {
const sizeToPixel = extent / TILE_SIZE;
for (let ii = 0; ii < line.length; ii++) {
const p = line[ii];
// LNGLAT
line[ii] = worldToLngLat([x + p[0] / sizeToPixel, y + p[1] / sizeToPixel], scale);
}
}
tags.forEach(tag => {
tag.position = worldToLngLat(tag.center, scale);
});