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

Provides a fluent interface for configuring GeoJSON data sources.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class GeoJsonDataSourceBuilder

Inheritance: objectGeoJsonDataSourceBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public GeoJsonDataSourceBuilder(DataSource dataSource, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:dataSourceDataSourceviewContextViewContexturlGeneratorIUrlGenerator

Methods

Configures the Read operation of the GeoJSON DataSource.

C#
public GeoJsonDataSourceBuilder Read(Action<CrudOperationBuilder> configurator)
Parameters:configuratorAction<CrudOperationBuilder>

The action that configures the Read operation settings.

Returns:

GeoJsonDataSourceBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Layers(layers =&gt;
{
layers.Add().DataSource(dataSource =&gt; dataSource
.GeoJson()
.Read(read =&gt; read.Url(Url.Content("~/data.geo.json")))
);
})
)

Sets the Controller, Action, and route values for the Read operation of the GeoJSON DataSource.

C#
public GeoJsonDataSourceBuilder Read(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

routeValuesobject

Route values

Returns:

GeoJsonDataSourceBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Layers(layers =&gt;
{
layers.Add().DataSource(dataSource =&gt; dataSource
.GeoJson()
.Read(read =&gt; read.Action("ActionName","ControllerName", new { id = 1 }))
);
})
)

Sets the Controller and Action for the Read operation of the GeoJSON DataSource.

C#
public GeoJsonDataSourceBuilder Read(string actionName, string controllerName)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

Returns:

GeoJsonDataSourceBuilder

Example:
C#
@(Html.Kendo().Map()
.Name("map")
.Layers(layers =&gt;
{
layers.Add().DataSource(dataSource =&gt; dataSource
.GeoJson()
.Read(read =&gt; read.Action("ActionName","ControllerName"))
);
})
)
C#
protected virtual void SetOperationUrl(CrudOperation operation, string actionName, string controllerName, object routeValues)
Parameters:operationCrudOperationactionNamestringcontrollerNamestringrouteValuesobject