---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/examples/cases/mapparams.md
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/examples/cases/mapparams.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt

# General parameters

<iframe id="LIVE-EXAMPLE" style="width:100%;height: 400px;border-radius: 8px;border: 1px solid rgba(92, 94, 102, 0.14);" frameBorder="0" src="https://yastatic.net/s3/front-maps-static/maps-front-jsapi-v2-1/examples/2/out/s3-cases/en/mapparams/index.html" allow="fullscreen"></iframe>

<a target="_blank" rel="noopener noreferrer" style="display: inline-block;margin-top: 10px;cursor: pointer;border-radius: 4px;padding: 9px 12px;background: #151515;color: white;text-decoration: none;font-weight: 500" href="https://codesandbox.io/p/sandbox/5tyncr?file=index.html">Open in CodeSandbox</a>

<div id="references">
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ready">ready</a>,
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Map">Map</a>
</div>
<p>
    <a href="https://yandex.ru/dev/jsapi-v2-1/doc/en/v2-1/dg/concepts/map#parameters">The main parameters of the map</a>
    are the viewport, mapping area, and map type.
</p>
<p>
    When creating a map, you must specify its center and zoom level.
    You can change them in the future.
</p>
<p>
    The API provides three built-in map types:
    <ul>
        <li>Scheme (yandex#map) - by default;</li>
        <li>Satellite (yandex#satellite);</li>
        <li>Hybrid (yandex#hybrid).</li>
   </ul>
</p>
<p>
    The map type is implemented as one or several layers superimposed on each other.
    It is possible to define new types of maps by creating your own layers
    and/or combining the pre-existing ones.
</p>

{% list tabs %}

-   index.html

    ```html
    <!DOCTYPE html>

    <html>
        <head>
            <title>Examples. Setting and changing the map settings.</title>
            <meta
                http-equiv="Content-Type"
                content="text/html; charset=UTF-8"
            />
            <!--
            Set your own API-key. Testing key is not valid for other web-sites and services.
            Get your API-key on the Developer Dashboard: https://developer.tech.yandex.ru/keys/
        -->
            
            
            
        </head>

        <body>
            <div id="map"></div>
            <div id="buttons">
                <input
                    type="button"
                    value="Change center"
                    onclick="setCenter();"
                />
                <input
                    type="button"
                    value="Change boundaries"
                    onclick="setBounds();"
                />
                <input
                    type="button"
                    value="Change the type and switch smoothly"
                    onclick="setTypeAndPan();"
                />
            </div>
        </body>
    </html>
    ```

-   mapparams.js

    ```js
    ymaps.ready(init);

    var myMap;

    function init() {
        // Map parameters can be set in the constructor.
        myMap = new ymaps.Map(
            // The ID of the DOM element that the map will be added to.
            "map",
            // Map parameters.
            {
                // Geographical coordinates of the center of the displayed map.
                center: [55.76, 37.64],
                // Scale.
                zoom: 10,
                // Type of map coverage: "Satellite".
                type: "yandex#satellite",
            },
            {
                // Searching for organizations.
                searchControlProvider: "yandex#search",
            }
        );
    }

    function setCenter() {
        myMap.setCenter([57.767265, 40.925358]);
    }

    function setBounds() {
        /**
         * Bounds - the boundaries of the map viewport. 
         * Set as the geographical coordinates of the South-Easternmost
    and North-Westernmost points of the viewport.
         */
        myMap.setBounds([
            [37, 38],
            [39, 40],
        ]);
    }

    function setTypeAndPan() {
        // Changing the map type to "Hybrid".
        myMap.setType("yandex#hybrid");
        // Smoothly moving the center of the map to the point with the new coordinates.
        myMap.panTo([62.915, 34.461], {
            // The delay between movements.
            delay: 1500,
        });
    }
    ```

{% endlist %}
