GeoJSONUtil
Provides a simple GeoJSON method
Methods​
- isGeoJSON(geojsonFeature)
- geojsonFeature
GeoJSON Feature,Point/LineString/......
- return
Boolean
- geojsonFeature
- isGeoJSONPolygon(geojsonFeature)
- geojsonFeature
GeoJSON Feature,Point/LineString/......
- return
Boolean
- geojsonFeature
- isGeoJSONLine(geojsonFeature)
- geojsonFeature
GeoJSON Feature,Point/LineString/......
- return
Boolean
- geojsonFeature
- isGeoJSONPoint(geojsonFeature) ``
- geojsonFeature
GeoJSON Feature,Point/LineString/......
- return
Boolean
- geojsonFeature
- isGeoJSONMulti(geojsonFeature)
MultiPoint/MultiLineString/MultiPolygon
- geojsonFeature
GeoJSON Feature,Point/LineString/......
- return
Boolean
- geojsonFeature
- getGeoJSONCoordinates(geojsonFeature) ``
- geojsonFeature
GeoJSON Feature,Point/LineString/......
- return
Array<Coordiantes>|Array<Array<Coordiantes>>|Array<Array<Array<Coordiantes>>>|Array<Array<Array<Array<Coordiantes>>>>
- geojsonFeature
- getGeoJSONCenter(geojsonFeature)
Center is the center of gravity
- geojsonFeature
GeoJSON Feature,Point/LineString/......
- return
maptalks.Coordiante
- geojsonFeature
const multiPolygon={
.......
}
const center=GeoJSONUtil.getGeoJSONCenter(multiPolygon);
- spliteGeoJSONMulti(geojsonFeature)
split multi geojson to single geojson
- geojsonFeature
GeoJSON Feature,Point/LineString/......
- return
Array<GeoJSONFeature>
- geojsonFeature
const multiPolygon={
.......
}
const polygons=GeoJSONUtil.spliteGeoJSONMulti(multiPolygon);