www.pudn.com > gmap-static-2005.rar > example2.aspx.cs, change:2008-08-14,size:1111b


´╗┐using System; 
using Frameworx.GMap; 
 
public partial class example2 : System.Web.UI.Page 
{ 
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
        // create new map object 
        StaticMap.Marker marker = new StaticMap.Marker(); 
        StaticMap map = new StaticMap(); 
 
        map.Width = 300; 
        map.Height = 300; 
        map.Zoom = 15; 
        map.LatCenter = 55.8592110; 
        map.LngCenter = -4.2466380; 
 
        // add markerss 
        marker.Lat = 55.8598393; 
        marker.Lng = -4.2480182; 
        marker.Size = StaticMap.mSize.Normal; 
        marker.Color = StaticMap.mColor.Purple; 
        marker.Character = "1"; 
        map.Markers.Add(marker); 
 
        marker = new StaticMap.Marker(); 
        marker.Lat = 55.8584424; 
        marker.Lng = -4.2457652; 
        marker.Size = StaticMap.mSize.Small; 
        marker.Color = StaticMap.mColor.Green; 
        marker.Character = "2"; // this won't be displayed - marker is too small 
        map.Markers.Add(marker); 
 
 
        // render map 
        imgMap.ImageUrl = map.Render(); 
    } 
}