Renders a Google Static Map on a web page.

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

Syntax

Remarks

The rendered map is an image fetched from Google's Static Maps API.

Examples

The code below shows how to define a StaticMap using markup alone.

CopyXML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
<%@ Register Assembly="Map" Namespace="Reimers.Map.Static" TagPrefix="Reimers" %>
<%@ Register Assembly="Map" Namespace="Reimers.Map" TagPrefix="Reimers" %>
<%@ Register Assembly="Map" Namespace="Reimers.Map.Controls" TagPrefix="Reimers" %>
<%@ Register Assembly="Map" Namespace="Reimers.Map.CustomMaps" TagPrefix="Reimers" %>
<%@ Register Assembly="Map" Namespace="Reimers.Map.Geocoding" TagPrefix="Reimers" %>
<!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:StaticMap runat="server" Zoom="10" MapType="Terrain" GoogleKey="YourGoogleKey">
                    <Center Latitude="51.5" Longitude="0.0" />
                    <Overlays>
                        <Reimers:StaticMarker ID="m" Letter="L" MarkerColor="Red" MarkerSize="Mid">
                            <Point Latitude="51.5" Longitude="0.0" />
                        </Reimers:StaticMarker>
                        <Reimers:StaticPolyline ID="p" LineColor="Blue" Opacity="0.7" Width="4">
                            <Points>
                                <Reimers:LatLng Latitude="51.5" Longitude="0.0" />
                                <Reimers:LatLng Latitude="48.85" Longitude="2.3" />
                            </Points>
                        </Reimers:StaticPolyline>
                    </Overlays>
                </Reimers:StaticMap>
            </div>
        </form>
    </body>
</html>

Inheritance Hierarchy

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

See Also