# CreateLayersFromGeoJsonParams

***

The parameters for the [LayersController.createLayersFromGeoJson](/js-sdk-api-reference/layers/layerscontroller.md#createlayersfromgeojson) method.

## Properties

### name

> **name**: `string`

The name of the layer to create.

***

### source

> **source**: [`GeoJsonUrlVectorSource`](/js-sdk-api-reference/layers/geojsonurlvectorsource.md) | [`GeoJsonDataVectorSource`](/js-sdk-api-reference/layers/geojsondatavectorsource.md) | [`GeoJsonFileVectorSource`](/js-sdk-api-reference/layers/geojsonfilevectorsource.md)

The source of the GeoJSON data.

***

### bounds?

> `optional` **bounds**: \[`number`, `number`, `number`, `number`]

Sets the bounds of the layer.

***

### caption?

> `optional` **caption**: `string`

Sets the caption of the layer.

***

### description?

> `optional` **description**: `string`

Sets the description of the layer.

***

### geometryStyles?

> `optional` **geometryStyles**: { `Point`: `object`; `Line`: `object`; `Polygon`: `object`; }

The styles to apply to each geometry on the layer.

Each style should be a valid FSL style, as described in [Layer.style](/js-sdk-api-reference/layers/layercommon.md#style).

These are optional, and if missing will use a default style determined by\
Felt, which you can consider to be undefined behaviour.

| Name       | Type     |
| ---------- | -------- |
| `Point`?   | `object` |
| `Line`?    | `object` |
| `Polygon`? | `object` |

#### Example

```typescript
const layer = await layersController.createLayersFromGeoJson({
  name: "My Layer",
  geometryStyles: {
    Point: {
      paint: { color: "red", size: 8 },
    },
    Line: {
      paint: { color: "blue", size: 4 },
      config: { labelAttribute: ["name"] },
      label: { minZoom: 0 },
    },
    Polygon: {
      paint: { color: "green", strokeColor: "darkgreen" },
    },
  },
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.felt.com/js-sdk-api-reference/layers/createlayersfromgeojsonparams.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
