Skip to content

gi-nx


gi-nx / updateGeoJSONLayerContents

ts
function updateGeoJSONLayerContents(layerName: string, fc: FeatureCollection): Promise<
  | void
  | EsriSceneServerLayer
  | LayerWithGiraffeStyle<
  | MapboxStyleLayer
  | MapboxStyleLayer[]>
  | LayerWithMapboxStyle<
  | MapboxStyleLayer
| MapboxStyleLayer[]>>;

Utility wrapper this uploads the geojson fc then calls patchLayer if layerName exists, otherwise createLayer then addProjectLayer.

Parameters

ParameterType
layerNamestring
fcFeatureCollection

Returns

Promise< | void | EsriSceneServerLayer | LayerWithGiraffeStyle< | MapboxStyleLayer | MapboxStyleLayer[]> | LayerWithMapboxStyle< | MapboxStyleLayer | MapboxStyleLayer[]>>