模块:ol/format/GeoJSON

ol/format/GeoJSON


GeoJSON

类型定义

GeoJSONGeometryCollection{module:geojson~GeoJSON}

Options{Object}

属性:
Name Type 描述
dataProjection ProjectionLike
(defaults to 'EPSG:4326')

默认数据投影。

featureProjection ProjectionLike | undefined

格式读取或写入要素的投影。传递给读取或写入方法的选项将优先生效。

geometryName string | undefined

创建要素时使用的几何名称。

extractGeometryName boolean
(defaults to false)

某些GeoJSON提供者在要素的GeoJSON中包含geometry_name字段。如果设置为trueGeoJSON解析器将查找该字段以设置几何名称。如果该字段被设置为true和一个geometryName若提供,则geometryName将优先处理。

featureClass FeatureToFeatureClass<FeatureType> | undefined

用于读取要素的要素类。默认为Feature如果性能是首要考量,且要素不会通过该格式进行修改或往返处理,请考虑使用RenderFeature