Let's create a blank ASP.NET MVC 4 project as we did in the previous chapter, but this time named LBM.Locator
. Next, we add a HomeController
class with a single action:
public class HomeController : Controller { public ActionResult Index() { ViewBag.Title = "LBM | Router"; return View(); } }
The action sets the title of the website and returns the view. The Index.chtml
view inside the Views/Home
folder, contains the same markup as shown in the previous chapter:
<div id="lbm-map"></div>
This is where we are going to place our map. For this we need to add a reference to the Bing Maps AJAX Control, and we'll do this on the _Layout.chtml
file, inside the Views/Shared
folder:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>@ViewBag.Title</title> @Styles.Render("~/Content/css") </head> <body> @RenderBody...