# toMercator

Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection
将WGS84 GeoJSON对象转换为Mercator (EPSG:900913)投影

> npm install @turf/projection

参数

参数 类型 描述
geojson (GeoJSON|Position) WGS84 GeoJSON 对象
options (Object) | 可选参数:见下文

options选项

属性 类型 默认值 描述
mutate boolean false 允许修改GeoJSON输入(如果为真,性能将显著提高)

返回

GeoJSON - true/false

示例

var pt = turf.point([-71,41]);
var converted = turf.toMercator(pt);
Last Updated: 6/23/2023, 10:33:35 PM