UNPKG

@visactor/vdataset

Version:

data processing tool

12 lines (11 loc) 367 B
import { project } from "../../utils/geo"; export const mercator = (data, options) => { const points = []; return data.forEach((item => { const [x, y] = project([ item.lng, item.lat ]); points.push(Object.assign(Object.assign({}, item), { coordinates: [ x, y ] })); })), points; }; //# sourceMappingURL=mercator.js.map