Map

The Map is an interactive widget that displays a geographic map with markers and routes.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/map
Export: default
Map interactive configuration
Copy Code
Copy to Codepen
$("#map").dxMap({
});

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

  • jQuery

    HTML
    <div id="map"></div>
    JavaScript
    $(function () {
        $("#map").dxMap({
            provider: 'bing',
            type: 'roadmap',
            zoom: 10,
            center: "40.749825, -73.987963"
        });
    });
  • AngularJS

    HTML
    <div dx-map="{
        provider: 'bing',
        type: 'roadmap',
        zoom: 10,
        center: '40.749825, -73.987963'
    }"></div>
  • Knockout

    HTML
    <div data-bind="dxMap: {
        provider: 'bing',
        type: 'roadmap',
        zoom: 10,
        center: '40.749825, -73.987963'
    }"></div>
  • ASP.NET MVC Wrappers

    @(Html.DevExtreme().Map()
        .ID("map")
        .Provider(GeoMapProvider.Bing)
        .Type(GeoMapType.Roadmap)
        .Zoom(10)
        .Center(40.749825, -73.987963)
    )

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 topics in the Installation section.

See Also

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the Map widget.

Methods

This section describes members used to manipulate a widget.

Events

This section describes events fired by this widget.