用C#创建一个封装Google Map API的GoogleMap Web服务器控件(二)
2008-04-23 16:01
519 查看
前面我们创建了一个很简单的GoogleMap控件,它显然不满足我们的需求,通过分析,我们有如下这些进一步的需求:
一. 我们想要给用户提供在客户端调整Map大小的功能,也就是说我们的用户可以根据自己的喜好在网页上自己调整Map的大小.
要实现这个功能,我们需要三个属性:MaxHeight,MaxWidth,SizePercent,我决定用前面重写的Heght和Width属性充当MaxHeight和MaxWidth属性,而Map的实际显示大小则由它们和SizePercent属性一起决定.SizePercent属性如下:
[
Bindable(true),
Category("Google"),
DefaultValue(50),
Description("The size percent.")
]
public virtual int SizePercent
private ArrayList _zoomBound;
[
Bindable(true),
Category("Google"),
Description("The zoom bounds."),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
Editor("Int32", typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerProperty)
]
public virtual ArrayList ZoomBound
[
Bindable(true),
Category("Google"),
DefaultValue(false),
Description("Gets or sets a value indicating whether [enable zoom bounds].")
]
public virtual bool EnableZoomBound
[
Bindable(true),
Category("Google"),
DefaultValue(0),
Description("Gets or sets the scroll interval.")
]
public virtual int ScrollInterval
[
Bindable(true),
Category("Google"),
DefaultValue(false),
Description("Gets or sets a value indicating whether [show draggable marker].")
]
public virtual bool ShowDraggableMarker
[
Bindable(true),
Category("Google"),
DefaultValue(""),
Description("The draggable marker related LongTextBox.")
]
public virtual string LongTextBox
[
Bindable(true),
Category("Google"),
DefaultValue(""),
Description("The draggable marker related LatTextBox.")
]
public virtual string LatTextBox
{
get
{
String s = (String)ViewState["LatTextBox"];
return (s == null) ? String.Empty : s;
}
set
{
ViewState["LatTextBox"] = value;
}
}
好了,后面的文章我将编写GoogleInfoWindow,GoogleMarker类及相应的集合类,并给GoogleMap类添加相应的集合属性及其他属性.
一. 我们想要给用户提供在客户端调整Map大小的功能,也就是说我们的用户可以根据自己的喜好在网页上自己调整Map的大小.
要实现这个功能,我们需要三个属性:MaxHeight,MaxWidth,SizePercent,我决定用前面重写的Heght和Width属性充当MaxHeight和MaxWidth属性,而Map的实际显示大小则由它们和SizePercent属性一起决定.SizePercent属性如下:
[
Bindable(true),
Category("Google"),
DefaultValue(50),
Description("The size percent.")
]
public virtual int SizePercent
private ArrayList _zoomBound;
[
Bindable(true),
Category("Google"),
Description("The zoom bounds."),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
Editor("Int32", typeof(UITypeEditor)),
PersistenceMode(PersistenceMode.InnerProperty)
]
public virtual ArrayList ZoomBound
[
Bindable(true),
Category("Google"),
DefaultValue(false),
Description("Gets or sets a value indicating whether [enable zoom bounds].")
]
public virtual bool EnableZoomBound
[
Bindable(true),
Category("Google"),
DefaultValue(0),
Description("Gets or sets the scroll interval.")
]
public virtual int ScrollInterval
[
Bindable(true),
Category("Google"),
DefaultValue(false),
Description("Gets or sets a value indicating whether [show draggable marker].")
]
public virtual bool ShowDraggableMarker
[
Bindable(true),
Category("Google"),
DefaultValue(""),
Description("The draggable marker related LongTextBox.")
]
public virtual string LongTextBox
[
Bindable(true),
Category("Google"),
DefaultValue(""),
Description("The draggable marker related LatTextBox.")
]
public virtual string LatTextBox
{
get
{
String s = (String)ViewState["LatTextBox"];
return (s == null) ? String.Empty : s;
}
set
{
ViewState["LatTextBox"] = value;
}
}
好了,后面的文章我将编写GoogleInfoWindow,GoogleMarker类及相应的集合类,并给GoogleMap类添加相应的集合属性及其他属性.
相关文章推荐
- 用C#创建一个封装Google Map API的GoogleMap Web服务器控件(二) (转)
- 用C#创建一个封装Google Map API的GoogleMap Web服务器控件(一)
- 用C#创建一个封装Google Map API的GoogleMap Web服务器控件(一) (转)
- 【C#】对异步请求处理程序IHttpAsyncHandler的理解和分享一个易用性封装 【手记】走近科学之为什么明明实现了IEnumerable<T>的类型却不能调用LINQ扩展方法 【手记】手机网页弹出层后屏蔽底层的滑动响应 【手记】ASP.NET提示“未能创建类型”处理 【Web】一个非常简单的移动web消息框 【手记】解决EXCEL跑SQL遇“查询无法运行或数据库表无法打开...”
- C# Generator 2D map (随机创建一个2D地表)
- Google Map API使用详解(十)——使用JavaScript创建地图详解(上)
- google map api javascript xml 生成一个简单的地图
- jQuery Google Charts----一个封装google chart api的jquery插件
- 将创建线程的API-pthread_create封装成一个线程类
- Google Map API使用详解(十)——使用JavaScript创建地图详解(上)
- jQuery Google Charts----一个封装google chart api的jquery插件
- jQuery Google Charts----一个封装google chart api的jquery插件 饼状图
- java1.8一个不错的api调用栈(1)从Stream<?>创建一个Map
- 将创建进程的API-posix_spawn封装成一个进程类
- 在 Linux 上使用 Google Maps API Version 2、DB2/Informix、PHP 和 JMeter 创建地图
- 使用PHP创建一个REST API(译)
- 关于注册Google Map api key的方法和解决网页无法显示的问题
- jquery与google map api结合使用 控件,监听器
- 在C#中使用Ribbon界面(一)——创建一个Ribbon窗口
- keytool输出sha1,造成Google Map API Key无法获取的解决办法