# geojsonType

Enforce expectations about types of GeoJSON objects for Turf.
执行对GeoJSON对象类型的预期。

> npm install @turf/invariant

参数

参数 类型 描述
value GeoJSON any GeoJSON object
type string expected GeoJSON type
name string name of calling function

示例

var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});

turf.geojsonType(locationA.geometry, 'Point', 'Location A');
Last Updated: 1/19/2021, 10:59:20 AM