Renders a Map on an ASP.NET 3.5 or 4 page.

Namespace: Reimers.Google.Map
Assembly: Reimers.Google.Map (in Reimers.Google.Map.dll) Version: 5.3.95.699 (5.3.95.699)

Syntax

Examples

To render the map on the page register the assembly using the following markup.

CopyXML
<%@ register assembly="Map" namespace="Reimers.Map" tagprefix="Reimers" %>

Use the following markup to insert the map on the location of the page where you want it:

CopyXML
<Reimers:Map ID="Map1" runat="server" />

Further attributes can be set in the markup. Note however that properties set in the markup cannot be changed during postbacks or callbacks.

The code below shows how a Map can be defined using markup alone.

CopyXML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Reimers.Google.Map" Namespace="Reimers.Google.Map" TagPrefix="Reimers" %>
<%@ Register TagPrefix="Reimers" Namespace="Reimers.Google.Map.Maps" Assembly="Reimers.Google.Map" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <Reimers:Map runat="server" Width="600" Height="400" DefaultMapType="Hybrid">
                    <Center Latitude="51.477" Longitude="0.0" />
                    <Overlays>
                        <Reimers:Marker Title="Marker">
                            <Point Latitude="51.477" Longitude="0.0" />
                        </Reimers:Marker>
                        <Reimers:Polyline Color="Green" Width="5">
                            <Points>
                                <Reimers:LatLng Latitude="51.477" Longitude="0.0" />
                                <Reimers:LatLng Latitude="51" Longitude="1.0" />
                            </Points>
                        </Reimers:Polyline>
                    </Overlays>
                </Reimers:Map>
            </div>
        </form>
    </body>
    </html>

Inheritance Hierarchy

System..::..Object
  System.Web.UI..::..Control
    Reimers.Google.Map..::..Map

See Also