我在我的项目中使用 Subgurim.Controles 谷歌地图。当我使用 StyledIconOptions、StyledIcon、StyledMarker 时,它显示缺少程序集或指令。这个问题需要什么名称空间...
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Subgurim.Controles;
protected void Page_Load(object sender, EventArgs e)
{
GLatLng latLng = new GLatLng(50, 10);
GMap1.setCenter(latLng);
GIcon icon = new GIcon();
icon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/circular/greencirclemarker.png";
icon.iconSize = new GSize(32, 32);
icon.iconAnchor = new GPoint(16, 16);
icon.infoWindowAnchor = new GPoint(25, 7);
StyledIconOptions iconOptions1 = new StyledIconOptions()
{
Text = "Hi",
Color = Color.Blue,
Fore = Color.Red,
StarColor = Color.Green
};
StyledIcon icon1 = new StyledIcon(StyledIconType.Marker, iconOptions1);
StyledMarker styledMarker1 = new StyledMarker(latLng, icon1);
StyledIconOptions iconOptions2 = new StyledIconOptions()
{
Text = "Hi, I'm a bubble!",
Color = Color.Orange,
Fore = Color.PaleGreen,
};
StyledIcon icon2 = new StyledIcon(StyledIconType.Bubble, iconOptions2);
StyledMarker styledMarker2 = new StyledMarker(latLng + new GLatLng(1.0, 1.0), icon2);
GInfoWindow window1 = new GInfoWindow(styledMarker1, "You can user StyledMarker as any other marker!");
GInfoWindow window2 = new GInfoWindow(styledMarker2, "You can user StyledMarker as any other marker!");
GMap1.Add(window1);
GMap1.Add(window2);
}