Skip to content

KBE3D / KBCore / turf / toWgs84

函数: toWgs84()

toWgs84<G>(geojson: G, options?: { mutate?: boolean; }): G

Function

Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection

类型参数

G

G = AllGeoJSON | Position

参数

geojson

G

Mercator GeoJSON object

options?

Optional parameters

mutate?

boolean

allows GeoJSON input to be mutated (significant performance increase if true)

返回

G

Projected GeoJSON

示例

ts
var pt = turf.point([-7903683.846322424, 5012341.663847514]);
var converted = turf.toWgs84(pt);

//addToMap
var addToMap = [pt, converted];

KBE3D @3.0.0 Copyright © 2024-present KBE3D