# ASP.NET MVC Map Overview

The Telerik UI Map HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI Map widget.

The Map displays geospatial information organized in layers and is supported for both desktop and mobile devices. It also provides tile layers, shape (vector) layers, and marker layers.

* [Demo page for the Map HtmlHelper](https://demos.telerik.com/aspnet-mvc/map/index)

## Initializing the Map

The following example demonstrates how to define the Map. The attribution text is HTML-encoded and cannot contain markup.

```Razor HtmlHelper
    @(Html.Kendo().Map()
        .Name("map")
        .Center(35.268107, -95.744821)
        .Zoom(2)
        .Layers(layers =>
        {
            layers.Add()
                .Type(MapLayerType.Tile)
                .UrlTemplate("http://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png")
                .Subdomains("a", "b", "c")
                .Attribution("\u00A9 OpenStreetMap contributors");
        })
        .Markers(markers =>
        {
            markers.Add()
                .Location(30.268107, -97.744821)
                .Shape(MapMarkersShape.PinTarget)
                .Tooltip(tooltip => tooltip.Content("Austin, TX"));
        })
    )
```

```C# Controller
    public partial class MapController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
    }
```

## Basic Configuration

The following example demonstrates the basic configuration for the Map component.

```Razor HtmlHelper
    <input id="zoomLevel"/>
    <button id="zoom" class="k-button">zoom()</button>

    @(Html.Kendo().Map()
        .Name("map")
        .Center(30.268107, -97.744821)
        .Zoom(3)
        .Layers(layers =>
        {
            layers.Add()
                .Type(MapLayerType.Tile)
                .UrlTemplate("http://tile2.opencyclemap.org/transport/#= zoom #/#= x #/#= y #.png")
                .Subdomains("a", "b", "c")
                .Attribution("\u00A9 OpenStreetMap contributors. " +
                            "Tiles courtesy of Andy Allan");
        })
    )

    <script>
        $("#zoom").click(function (e) {
                var map = $("#map").data("kendoMap")
                map.zoom(
                    parseInt($("#zoomLevel").val(), 10)
                );
            });
    </script>
```

## Next Steps

* [Getting Started with the Map](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/diagrams-and-maps/map/getting-started)
* [Basic Usage of the Map for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/map/index)
* [Azure Tile Layout of the Map for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/diagrams-and-maps/map/azure-tiles)
* [Map Events](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/diagrams-and-maps/map/events)

## See Also

* [Basic Usage of the Map HtmlHelper for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/map/index)

* [Server-Side API of the Map for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/api/map)
