forked from extnet/Ext.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGMapPanel.cs
More file actions
83 lines (69 loc) · 2.68 KB
/
GMapPanel.cs
File metadata and controls
83 lines (69 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/********
* This file is part of Ext.Net UX.
* Ext.Net UX is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Ext.Net UX is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with the Ext.Net. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* @version: 1.5.0
* @author: Ext.NET, Inc. http://www.ext.net/
* @date: 2012-02-21
* @copyright: Copyright (c) 2007-2012, Ext.NET, Inc. or as noted within each
* applicable file LICENSE.txt file
* @license: LGPL 3.0 License
* @website: http://www.ext.net/
********/
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Web;
using System.Web.UI;
[assembly: WebResource("Ext.Net.UX.Extensions.GMapPanel.resources.GMapPanel.js", "text/javascript")]
namespace Ext.Net.UX
{
[Designer(typeof(EmptyDesigner))]
[DefaultProperty("")]
[ToolboxBitmap(typeof(UX.GMapPanel), "Extensions.GMapPanel.GMapPanel.bmp")]
[ToolboxData("<{0}:GMapPanel runat=\"server\" Title=\"Google Map\" Height=\"300\"></{0}:GMapPanel>")]
[Description("GMap Panel")]
public partial class GMapPanel : GMapPanelBase
{
protected override List<ResourceItem> Resources
{
get
{
List<ResourceItem> baseList = base.Resources;
baseList.Capacity += 1;
baseList.Add(new ClientScriptItem(typeof(GMapPanel), "Ext.Net.UX.Extensions.GMapPanel.resources.GMapPanel.js", "ux/extensions/gmappanel/gmappanel.js"));
return baseList;
}
}
public override string XType
{
get
{
return "gmappanel";
}
}
public override string InstanceOf
{
get
{
return "Ext.ux.GMapPanel";
}
}
protected override void OnBeforeClientInit(Observable sender)
{
base.OnBeforeClientInit(sender);
string apiKey = HttpContext.Current.Items["GMapApiKey"] as string;
this.ResourceManager.RegisterClientScriptInclude("GMapApiKey", string.Format(this.APIBaseUrl, apiKey ?? this.APIKey));
}
}
}