User Control Page /Controls/GoogleMapForASPNet.ascx (C#)
Uses Code Behind Page Page /Controls/GoogleMapForASPNet.ascx.cs (C#)
1: <%--//   Google Maps User Control for ASP.Net version 1.0:  
2: //   ========================  
3: //   Copyright (C) 2008  Shabdar Ghata  
4: //   Email : ghata2002@gmail.com  
5: //   URL : http://www.shabdar.org  
6:   
7: //   This program is free software: you can redistribute it and/or modify  
8: //   it under the terms of the GNU General Public License as published by  
9: //   the Free Software Foundation, either version 3 of the License, or  
10: //   (at your option) any later version.  
11:   
12: //   This program is distributed in the hope that it will be useful,  
13: //   but WITHOUT ANY WARRANTY; without even the implied warranty of  
14: //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
15: //   GNU General Public License for more details.  
16:   
17: //   You should have received a copy of the GNU General Public License  
18: //   along with this program.  If not, see <http://www.gnu.org/licenses/>.  
19:   
20: //   This program comes with ABSOLUTELY NO WARRANTY.  
21: --%>  
22: <%@ Control Language="C#" AutoEventWireup="true" Inherits="GoogleMapForASPNet" Codebehind="GoogleMapForASPNet.ascx.cs" %>  
23: <%@ Register Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"  
24:     Namespace="System.Web.UI" TagPrefix="asp" %>  
25: <asp:ScriptManagerProxy ID="ScriptManager1" runat="server">  
26: <Services>  
27:     <asp:ServiceReference Path="~/Include/GService.asmx" />  
28:   </Services>  
29: </asp:ScriptManagerProxy>  
30: <div id="GoogleMap_Div_Container">  
31: <div id="GoogleMap_Div" style="width:<%=GoogleMapObject.Width %>;height:<%=GoogleMapObject.Height %>;">  
32:   
33: </div>  
34: <%  
35: if(ShowControls)  
36: {  
37: %>  
38:   
39: <input type="button" id="btnFullScreen" value="Full Screen"  onclick="ShowFullScreenMap();" />  
40:     
41: <input type="checkbox" id="chkIgnoreZero" onclick="IgnoreZeroLatLongs(this.checked);" />Ignore Zero Lat Longs  
42: <% } %>  
43: </div>  
44: <div id="directions_canvas">  
45:   
46: </div>  
47: <asp:UpdatePanel ID="UpdatePanelXXXYYY" runat="server">  
48: <ContentTemplate>  
49:     <asp:HiddenField ID="hidEventName" runat="server" />  
50:     <asp:HiddenField ID="hidEventValue" runat="server" />  
51: </ContentTemplate>  
52: </asp:UpdatePanel>  
53:   
54: <script language="javascript" type="text/javascript">  
55:     //RaiseEvent('MovePushpin','pushpin2');  
56: function RaiseEvent(pEventName,pEventValue)  
57: {  
58:     document.getElementById('<%=hidEventName.ClientID %>').value = pEventName;  
59:     document.getElementById('<%=hidEventValue.ClientID %>').value = pEventValue;  
60:     if(document.getElementById('<%=UpdatePanelXXXYYY.ClientID %>') != null)  
61:     {  
62:         __doPostBack('<%=UpdatePanelXXXYYY.ClientID %>','');  
63:     }  
64: }  
65:   
66: </script>  

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.