accessKey
The value of this option will be passed to the accesskey
attribute of the HTML element that underlies the widget.
autoAdjust
Specifies whether the widget automatically adjusts center and zoom option values when adding a new marker or route, or if a new widget contains markers or routes by default.
If autoAdjust is enabled, zoom is set to the maximum value allowing all markers and routes to be displayed at the same time. The center is changed so that markers and routes are aligned with the widget's center. Set the autoAdjust option to false to disable this behavior.
Note that the zoom level can only be automatically decreased to display all markers and routes. If the current zoom level allows all routes and markers to be displayed on the map, it remains unchanged.
center
An object, a string, or an array specifying which part of the map is displayed at the widget's center using coordinates. The widget can change this value if autoAdjust is enabled.
You can specify the center value in one of the following formats:
- { lat: 40.749825, lng: -73.987963}
- "40.749825, -73.987963"
- [40.749825, -73.987963]
- 'Brooklyn Bridge,New York,NY'
When you use the Map as an ASP.NET MVC Control, this option accepts either a string value indicating the address, or two double
type values indicating the coordinates.
@(Html.DevExtreme().Map() .Center("Brooklyn Bridge,New York,NY") // ===== or ===== .Center(40.74982, -73.987963) )
@(Html.DevExtreme().Map() _ .Center("Brooklyn Bridge,New York,NY") _ ' ===== or ===== .Center(40.74982, -73.987963) )
elementAttr
Specifies the attributes to be attached to the widget's root element.
You can configure this option in an ASP.NET MVC Control as follows:
@(Html.DevExtreme().WidgetName() .ElementAttr("class", "class-name") // ===== or ===== .ElementAttr(new { @id = "elementId", @class = "class-name" }) // ===== or ===== .ElementAttr(new Dictionary<string, object>() { { "id", "elementId" }, { "class", "class-name" } }) )
@(Html.DevExtreme().WidgetName() _ .ElementAttr("class", "class-name") ' ===== or ===== .ElementAttr(New With { .id = "elementId", .class = "class-name" }) ' ===== or ===== .ElementAttr(New Dictionary(Of String, Object) From { { "id", "elementId" }, { "class", "class-name" } }) )
height
This option accepts a value of one of the following types:
Number
The height in pixels.String
A CSS-accepted measurement of height. For example,"55px"
,"80%"
,"auto"
,"inherit"
.Function
A function returning either of the above. For example:JavaScriptheight: function() { return window.innerHeight / 1.5; }
key
This option can hold a string representing an authentication key of a certain provider. In addition, this option can hold an object with specified keys for every used provider: { bing: BINGAPIKEY, google: GOOGLEAPIKEY, googleStatic: GOOGLESTATICAPI_KEY}.
For more information on authentication keys, see the required map provider documentation.
markerIconSrc
To set a custom icon for an individual marker, specify the iconSrc field of the corresponding marker data source object.
markers[]
If you use the Knockout approach when working with the Map widget, you can pass an observable array to the markers option to easily manage markers.
onClick
A handler for the click event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
location |
The clicked point's location on the map (if the 'google' or 'bing' provider is used). |
|
jQueryEvent |
Use 'event' instead. The jQuery event that caused the handler execution (if a static google provider is used). Deprecated in favor of the event field. |
|
event | Event (jQuery or EventObject) |
The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery. |
onDisposing
A handler for the disposing event. Executed when the widget is removed from the DOM using the remove(), empty(), or html() jQuery methods only.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if you use Knockout. |
onInitialized
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
onMarkerAdded
A handler for the markerAdded event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
options |
The added marker's data. |
|
originalMarker |
The original marker that the current map provider uses (only for 'google' and 'bing' providers). |
onMarkerRemoved
A handler for the markerRemoved event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
options |
The removed marker's data. |
onOptionChanged
Name | Type | Description |
---|---|---|
name |
The option's short name. |
|
model |
The model data. Available only if you use Knockout. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The widget's instance. |
|
fullName |
The option's full name. |
|
value | any |
The option's new value. |
onReady
A handler for the ready event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
originalMap |
The current provider's map data. |
onRouteAdded
A handler for the routeAdded event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
options |
The added route's data. |
|
originalRoute |
The original route that the current map provider uses (only for 'google' and 'bing' providers). |
onRouteRemoved
A handler for the routeRemoved event.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
|
options |
The removed route's data. |
provider
Use the "googleStatic" provider to connect route points directly rather than by following the street layout.
When using the widget as an ASP.NET MVC Control, specify this option using the GeoMapProvider
enum. This enum accepts the following values: Bing
, Google
, and GoogleStatic
.
rtlEnabled
When this option is set to true, the widget text flows from right to left, and the layout of elements is reversed. To switch the entire application/site to the right-to-left representation, assign true to the rtlEnabled field of the object passed to the DevExpress.config(config) method.
DevExpress.config({ rtlEnabled: true });
See Also
- Right-to-Left Support Demo: DataGrid | Navigation Widgets | Editors
tabIndex
The value of this option will be passed to the tabindex
attribute of the HTML element that underlies the widget.
type
The available option values are based on map types supported by the Google map provider. If you use the Bing map, the widget casts the option value to the appropriate value supported by the "Bing" provider.
- hybrid -> Aerial
- roadmap -> Road
When using the widget as an ASP.NET MVC Control, specify this option using the GeoMapType
enum. This enum accepts the following values: Hybrid
, Roadmap
and Satellite
.
width
This option accepts a value of one of the following types:
Number
The width in pixels.String
A CSS-accepted measurement of width. For example,"55px"
,"80%"
,"auto"
,"inherit"
.Function
A function returning either of the above. For example:JavaScriptwidth: function() { return window.innerWidth / 1.5; }
zoom
The map's zoom level. The widget can change this value if autoAdjust is enabled.
If you have technical questions, please create a support ticket in the DevExpress Support Center.