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({
});

DevExtreme widgets are integrated with many popular libraries and frameworks. See the Installation section (for JavaScript libraries) or the Prerequisites and Installation section (for ASP.NET MVC framework) to find details on setting up DevExtreme with a particular library or framework.

The following code shows how to create the Map widget using every supported library and framework. For more details on working with widgets in these libraries and frameworks, see the Widget Basics topic for jQuery, Angular, AngularJS, Knockout or ASP.NET MVC.

jQuery
JavaScript
HTML
$(function () {
    $("#map").dxMap({
        provider: 'bing',
        type: 'roadmap',
        zoom: 10,
        center: "40.749825, -73.987963"
    });
});
<div id="map"></div>
Angular
HTML
TypeScript
<dx-map
    provider="bing"
    type="roadmap"
    [zoom]="10"
    center="40.749825, -73.987963">
</dx-map>
import { DxMapModule } from 'devextreme-angular';
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxMapModule
    ],
    // ...
})
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 Controls
Razor C#
Razor VB
@(Html.DevExtreme().Map()
    .ID("map")
    .Provider(GeoMapProvider.Bing)
    .Type(GeoMapType.Roadmap)
    .Zoom(10)
    .Center(40.749825, -73.987963)
)
@(Html.DevExtreme().Map() _
    .ID("map") _
    .Provider(GeoMapProvider.Bing) _
    .Type(GeoMapType.Roadmap) _
    .Zoom(10) _
    .Center(40.749825, -73.987963)
)
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.

See Also