toMercator
Description
Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection
Parameters
Name | Type | Description |
---|---|---|
geojson | GeoJSON | Position | WGS84 GeoJSON object |
options? | Object | Optional parameters (default {}) |
options.mutate? | boolean | allows GeoJSON input to be mutated (significant performance increase if true) (default false) |
Returns
GeoJSON Projected GeoJSON
Examples
var pt = turf.point([-71, 41]);
var converted = turf.toMercator(pt);
Installation
$ npm install @turf/projection
import { toMercator } from "@turf/projection";
const result = toMercator(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.toMercator(...);