VectorMap

The VectorMap is a widget that visualizes 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.viz.js, dx.viz-web.js, dx.all.js
Module: viz/vector_map
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 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.