New to Telerik UI for ASP.NET MVC? Download free 30-day trial

MapBuilder

Defines the fluent API for configuring the Kendo Map for ASP.NET MVC.

Methods

Center(System.Double,System.Double)

Configures the center of the map.

Parameters

latitude - System.Double

The latitude

longtitude - System.Double

The longtitude

Controls(System.Action)

The configuration of built-in map controls.

Parameters

configurator - System.Action<MapControlsSettingsBuilder>

The action that configures the controls.

LayerDefaults(System.Action)

The default configuration for map layers by type.

Parameters

configurator - System.Action<MapLayerDefaultsSettingsBuilder>

The action that configures the layerdefaults.

MinZoom(System.Double)

The minimum zoom level. Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).

Parameters

value - System.Double

The value that configures the minzoom.

MaxZoom(System.Double)

The maximum zoom level. Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).

Parameters

value - System.Double

The value that configures the maxzoom.

MinSize(System.Double)

The size of the map in pixels at zoom level 0.

Parameters

value - System.Double

The value that configures the minsize.

Pannable(System.Boolean)

Controls whether the user can pan the map.

Parameters

value - System.Boolean

The value that configures the pannable.

Wraparound(System.Boolean)

Specifies whether the map should wrap around the east-west edges.

Parameters

value - System.Boolean

The value that configures the wraparound.

Zoom(System.Double)

The initial zoom level.Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).The map size is derived from the zoom level and minScale options: size = (2 ^ zoom) * minSize

Parameters

value - System.Double

The value that configures the zoom.

Zoomable(System.Boolean)

Controls whether the map zoom level can be changed by the user.

Parameters

value - System.Boolean

The value that configures the zoomable.

Layers(System.Action)

The configuration of the map layers. The layer type is determined by the value of the type field.

Parameters

configurator - System.Action<MapLayerFactory>

The action that configures the layers.

Markers(System.Action)

The configuration of the map markers.

Parameters

configurator - System.Action<MapMarkerFactory>

The action that configures the markers.

MarkerDefaults(System.Action)

The default options for all markers.

Parameters

configurator - System.Action<MapMarkerDefaultsSettingsBuilder>

The action that configures the markerdefaults.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<MapEventBuilder>

The client events action.

Example


             @( Html.Kendo().Map()
                        .Name("Map")
                        .Events(events => events
                            .Click("onClick")
                        )
            )

ToComponent()

Returns the internal view component.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name of the component.

Example


            @(Html.Kendo().Grid<OrderViewModel>()
               .Name("grid")
               .Columns(columns =>
               {
                   columns.Bound(p => p.OrderID).Filterable(false);
                   columns.Bound(p => p.Freight);  
               })
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .PageSize(20)
                   .Read(read => read.Action("Orders_Read", "Grid"))
               )
            )

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean)

Parameters

deferred - System.Boolean

ModelMetadata(System.Web.Mvc.ModelMetadata)

Uses the Metadata of the Model.

Parameters

modelMetadata - System.Web.Mvc.ModelMetadata

The metadata set for the Model

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

Render()

Renders the component.

Example


            @(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
            @( Html.Kendo().Grid(Model)
                .Name("grid")
                .DetailTemplate(product => {
                    )
                       Product Details:
                       <div>Product Name: @( product.ProductName )</div>
                       <div>Units In Stock: @( product.UnitsInStock )</div>
                    @(
                })
                .Render();
            )

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?