VectorMap

The dxVectorMap is a widget that visualize geographical locations. This widget represents a geographical map that contains areas and markers. Areas embody continents and countries. Markers flag specific points on the map, for example, towns, cities or capitals.

Included in: dx.chartjs.js, dx.all.js
VectorMap interactive configuration
Copy Code
Copy to Codepen
$("#vectormap").dxVectorMap({
});

You can create the widget using one of the following approaches.

  • jQuery
    Use the dxVectorMap jQuery plug-in.

    HTML
    <div id="mapContainer"></div>
    JavaScript
    $("#mapContainer").dxVectorMap({
        layers: [{
            type: 'area',
            dataSource: DevExpress.viz.map.sources.world
        }]
        //...
    });
  • Knockout
    Add a div element and apply the dxVectorMap binding to this element.

    HTML
    <div data-bind="dxVectorMap: {
        layers: [{
            type: 'area',
            dataSource: DevExpress.viz.map.sources.world
        }]
        //...
    }"></div>
  • AngularJS
    Add a div element and apply the dx-vector-map directive to this element.

    HTML
    <div dx-vector-map="{
        layers: [{
            type: 'area',
            dataSource: DevExpress.viz.map.sources.world
        }]
        //...
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on how to link the needed libraries, refer to the Installation article.

Start Tutorial View Demo Watch Video

See Also

To learn the widget's concepts and overview features, refer to the Vector Map section within the Data Visualization Guides.

Configuration

An object that specifies configuration options for the dxVectorMap widget.

Methods

This section describes the methods that can be used in code to manipulate objects related to the dxVectorMap widget.

Events

This section describes events fired by this widget.

Map Elements

This section lists the methods and fields of the map elements.