Googlemap control for Asp.Net MVC

Image Map Type

About this example

This example make use of the most detailed map of the "Game of Thrones" world ever

You can find more info about the map in the site http://www.sermountaingoat.co.uk/map/index.php

This is an excerpt of the code used by the sample

    @(Html.GoogleMap()
        .Name("map")
        .Zoom(1)
        .Height(520)
        .Latitude(0)
        .Longitude(0)
        .ZoomControlStyle(ZoomControlStyle.Large)
        .StreetViewControlVisible(false)
        .ImageMapTypes(map =>
            map.Add()
                .TileUrlPattern("~/maptype/GetLabeledTile?x={0}&y={1}&zoom={2}&tileWith={3}&tileHeigth={4}")
                .TileSize(new Size(256, 256))
                .RepeatHorizontally(false)
                .RepeatVertically(false)
                .MaxZoom(4)
                .MinZoom(1)
                .MapTypeName("Labels")
                .MapTypeAltName("Game of Thrones Labeled")
        )
        .MapTypeId("Labels")
     
)

Notice that the TileUrlPattern could be whatever url that returns a tileImage.
Be aware that the TileUrlPattern value will be parsed by the control to find and replace the string parameters in the following order

  1. x
  2. y
  3. zoom
  4. tileWith
  5. tileHeigth