---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/cookbook/specific-functions
  - ru/cookbook/specific-functions
  - href: en/cookbook/specific-functions.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/cookbook/specific-functions.html
vcsPath: en/cookbook/specific-functions.md
---
# Connecting specific features

## Connecting Yandex Maps

DataLens features an embedded simple world map. However, to work with geolocation data in Russia and the CIS or use the **Satellite** and **Hybrid** map layers, you need integration with Yandex Maps.

{% note info %}

For geoanalytics use cases, see our [demo dashboard](https://datalens.yandex/demo).

{% endnote %}


### Administrator tasks

**Get an API key**. Your organization must obtain an [API key for the JavaScript API and Geocoding API](https://yandex.com/dev/maps/commercial/). This is a commercial product subject to an individual agreement.

**Activate the feature**. There are two ways to do this:

1. **Basic**

    To enable Maps, add two parameters during initialization:

    ```shell
    ./init.sh --yandex-map --yandex-map-token <your_Yandex_Maps_API_key>
    ```

1. **Advanced**

    {% note tip %}

    Make sure the configuration in `values.yaml` is complete.

    {% endnote %}

    1. **Configure `values.yaml`**. 
  
        After you get the key, specify it in the DataLens configuration:

        ```yaml
        # In your `values.yaml` file
        features:
          yandex_map:
            enabled: true
            token: 'YOUR_YANDEX_MAPS_API_KEY'
        ```

    1. **Applying the configuration**.
  
        Run `./init.sh --values <your_file>.yaml` to apply the changes.

        After that, users will see an option to select Yandex Maps layers in their map settings.

## Chart Editor

{% note info %}

Chart Editor is a sandbox tool for advanced users and developers, enabling visualizations beyond the standard types.

{% endnote %}

**How it works**:

* Users write JavaScript code.

* In their code, they can use third-party libraries for complex charts or Gravity UI Charts which DataLens uses internally.

  For an example, see [this article](../charts/editor/quickstart/from-dataset.md).

* Data for visualization can come from a dataset or JSON API connector.

  For an example, see [this article](../charts/editor/quickstart/from-api-connector.md).

{% note info %}

For real-world examples of using Chart Editor, see our [Editor Demo Dashboard](https://datalens.yandex/editor-demo).

{% endnote %}

### Administrator tasks

The administrator only has to enable the feature. There are two ways to do this:

* **Basic**

  You can enable Chart Editor by adding this parameter:

  ```shell
  ./init.sh --editor
  ```

* **Advanced**

   {% note info %}

   Make sure the configuration in `values.yaml` is complete.

   {% endnote %}

   1. **Configure `values.yaml`**.
  
      After you get the key, specify it in the DataLens configuration:

      ```yaml
      # In your `values.yaml` file
      features:
        editor:
          enabled: true
      ```

   1. **Applying the configuration**.

      Run `./init.sh --values <your_file>.yaml` to apply your changes.

      After that, users will see a new chart type, **Chart Editor**, in their chart creation menu. Administrators do not need to write Chart Editor code; they simply need to provide their users with this feature.

## Knowledge check

An analyst asks you to enable the **Satellite** layer in DataLens maps. To do this, which of the following is required?

* Activate `features.editor.enabled: true`

* Obtain a commercial Yandex Maps API key and configure it in `values.yaml`

* Increase the replica count for the `data-api` pod

* Create a connection to a database with geocoordinates

{% cut "Find out the answer" %}

* Activate `features.editor.enabled: true`

  Incorrect. Chart Editor is a dedicated feature for custom visualizations, unrelated to Yandex Maps.

* Obtain a commercial Yandex Maps API key and configure it in `values.yaml`

  Correct. The **Satellite** and **Hybrid** layers are provided under the commercial Yandex Maps API, for which you need a key.

* Increase the replica count for the `data-api` pod

  Wrong. Map layer availability is unrelated to `data-api` performance.

* Create a connection to a database with geocoordinates

  Wrong. While you need geospatial data to render a chart with a map, it is not required to enable map layers in the UI.

{% endcut %}

## Summary

Now you know how to enhance DataLens default capabilities by providing your users with access to Yandex Maps and Chart Editor. As an administrator, your job is to activate and configure the platform, so that analysts can create content.
