Configuration center

Specifies the geographical coordinates of the center for a map.

Type: Object

By default, the map in the dxVectorMap widget is centered on the (0, 0) point. If you need to center the map on a different geographical point, set its geographical coordinates to the lat and lon field of the center configuration object.

Show Example:
jQuery

In this example, the map is centered on Africa in code using the center configuration object.

<div id="mapContainer" style="height:500px; max-width:800px; margin: 0 auto"></div>
var i = 0;

$(function () {
    $('#mapContainer').dxVectorMap({
        mapData: '/Content/data/vectorMap-sources/africa.txt',
        areaSettings: {
            palette: 'Soft',
            paletteSize: 10,
            customize: function () {
                return { paletteIndex: i++ % 10 };
            }
        },
        zoomFactor: 4.5,
        center: {
            lat: 2,
            lon: 20
        }
    });
});

lat

Specifies a latitude for the center of a map.

Type: Number
Default Value: 0

lon

Specifies a longitude for the center of a map.

Type: Number
Default Value: 0