Data Visualization Widgets VectorMap

A vector map widget.

Included in: dx.viz.js, dx.viz-web.js, dx.all.js
Module: viz/vector_map
VectorMap interactive configuration
Copy code
$("#vectormap").dxVectorMap({
});

The VectorMap widget is designed to visualize data connected with a geographical location. This widget represents a map that contains areas and markers. The map areas usually reflect geographical regions, such as countries, continents, etc., while the map markers are used to flag certain points on a map, e.g., towns, cities or capitals.

You can create a 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 library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the Installation article.

Start Tutorial View Demo Watch Video

See Also

Configuration

An object that specifies configuration options for the VectorMap widget.

Methods

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

Events

This section describes events fired by this widget.

Map Elements

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