代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
Asp.Net
】
google地图 GoogleMapForASPNet.ascx
作者:
Dezai.CN
/ 发布于
2012/2/8
/
424
GoogleMapForASPNet.ascx
<div> <div class="container"> <div class="line number1 index0 alt2">"csharp plain"><%@ Control Language="csharp string">"C#" "csharp plain">AutoEventWireup="csharp string">"true" "csharp plain">CodeFile="csharp string">"GoogleMapForASPNet.ascx.cs" "csharp plain">Inherits="csharp string">"GoogleMapForASPNet" "csharp plain">%> </div> <div class="line number2 index1 alt1">"csharp plain"><%@ Register Assembly="csharp string">"System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"</div> <div class="line number3 index2 alt2">"csharp spaces"> "csharp plain">Namespace="csharp string">"System.Web.UI" "csharp plain">TagPrefix="csharp string">"asp" "csharp plain">%> </div> <div class="line number4 index3 alt1">"csharp plain"><asp:ScriptManager ID="csharp string">"ScriptManager1" "csharp plain">runat="csharp string">"server""csharp plain">> </div> <div class="line number5 index4 alt2">"csharp spaces"> "csharp plain"><Services> </div> <div class="line number6 index5 alt1">"csharp spaces"> "csharp plain"><asp:ServiceReference Path="csharp string">"~/GService.asmx" "csharp plain">/> </div> <div class="line number7 index6 alt2">"csharp spaces"> "csharp plain"><asp:ServiceReference Path="csharp string">"~/GoogleMapForASPNet.ascx" "csharp plain">/> </div> <div class="line number8 index7 alt1">"csharp spaces"> "csharp plain"></Services> </div> <div class="line number9 index8 alt2">"csharp plain"></asp:ScriptManager> </div> <div class="line number10 index9 alt1">"csharp plain"><div id="csharp string">"GoogleMap_Div" "csharp plain">style="csharp string">"width:<%=GoogleMapObject.Width %>;height:<%=GoogleMapObject.Height %>;""csharp plain">> </div> <div class="line number11 index10 alt2">"csharp spaces"> </div> <div class="line number12 index11 alt1">"csharp plain"></div> </div> <div class="line number13 index12 alt2">"csharp plain"><div id="csharp string">"directions_canvas""csharp plain">> </div> <div class="line number14 index13 alt1">"csharp spaces"> </div> <div class="line number15 index14 alt2">"csharp plain"></div> </div> <div class="line number16 index15 alt1">"csharp plain"><asp:UpdatePanel ID="csharp string">"UpdatePanel1" "csharp plain">runat="csharp string">"server""csharp plain">> </div> <div class="line number17 index16 alt2">"csharp plain"><ContentTemplate> </div> <div class="line number18 index17 alt1">"csharp spaces"> "csharp plain"><asp:HiddenField ID="csharp string">"hidEventName" "csharp plain">runat="csharp string">"server" "csharp plain">/> </div> <div class="line number19 index18 alt2">"csharp spaces"> "csharp plain"><asp:HiddenField ID="csharp string">"hidEventValue" "csharp plain">runat="csharp string">"server" "csharp plain">/> </div> <div class="line number20 index19 alt1">"csharp plain"></ContentTemplate> </div> <div class="line number21 index20 alt2">"csharp plain"></asp:UpdatePanel> </div> <div class="line number22 index21 alt1">"csharp spaces"> </div> <div class="line number23 index22 alt2">"csharp plain"><script src="csharp string">"<a href="http://maps.google.com/maps?file=api&v=">http://maps.google.com/maps?file=api&v=</a><%=GoogleMapObject.APIVersion %>&key=ABQIAAAAfqVyKlfXjoXu6CA7msi1KRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQuvdbgukTIg5TF72llfT7Ht23-9A" "csharp plain">type="csharp string">"text/javascript""csharp plain">></script> </div> <div class="line number24 index23 alt1">"csharp plain"><script language="csharp string">"JavaScript""csharp plain">> </div> <div class="line number25 index24 alt2">"csharp spaces"> </div> <div class="line number26 index25 alt1">"csharp spaces"> "csharp comments">//RaiseEvent('MovePushpin','pushpin2'); </div> <div class="line number27 index26 alt2">"csharp plain">function RaiseEvent(pEventName,pEventValue) </div> <div class="line number28 index27 alt1">"csharp plain">{ </div> <div class="line number29 index28 alt2">"csharp spaces"> "csharp plain">document.getElementById("csharp string">'<%=hidEventName.ClientID %>'"csharp plain">).value = pEventName; </div> <div class="line number30 index29 alt1">"csharp spaces"> "csharp plain">alert(hidEnentName.ClientID); </div> <div class="line number31 index30 alt2">"csharp spaces"> "csharp plain">document.getElementById("csharp string">'<%=hidEventValue.ClientID %>'"csharp plain">).value = pEventValue; </div> <div class="line number32 index31 alt1">"csharp spaces"> "csharp plain">alert(hidEventValue.ClientID); </div> <div class="line number33 index32 alt2">"csharp spaces"> "csharp plain">__doPostBack("csharp string">'UpdatePanel1'"csharp plain">,"csharp string">''"csharp plain">); </div> <div class="line number34 index33 alt1">"csharp plain">} </div> <div class="line number35 index34 alt2">"csharp spaces"> </div> <div class="line number36 index35 alt1">"csharp plain">var map; </div> <div class="line number37 index36 alt2">"csharp plain">var trafficInfo = "csharp keyword">null"csharp plain">; </div> <div class="line number38 index37 alt1">"csharp spaces"> </div> <div class="line number39 index38 alt2">"csharp comments">//function fListeners() </div> <div class="line number40 index39 alt1">"csharp comments">//{ </div> <div class="line number41 index40 alt2">"csharp comments">// this.listeners = new Array(); </div> <div class="line number42 index41 alt1">"csharp comments">// this.getLength = function() { return this.listeners.length; }; </div> <div class="line number43 index42 alt2">"csharp comments">// this.pushValue = function(v) { this.listeners.push(v); } </div> <div class="line number44 index43 alt1">"csharp comments">// this.getValue = function(i) { return this.listeners[i]; } </div> <div class="line number45 index44 alt2">"csharp comments">//} </div> <div class="line number46 index45 alt1">"csharp plain">function fMarkers() </div> <div class="line number47 index46 alt2">"csharp plain">{ </div> <div class="line number48 index47 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.markers = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number49 index48 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getLength = function() { "csharp keyword">return "csharp keyword">this"csharp plain">.markers.length; }; </div> <div class="line number50 index49 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.pushValue = function(v) { "csharp keyword">this"csharp plain">.markers.push(v); } </div> <div class="line number51 index50 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getValue = function(i) { "csharp keyword">return "csharp keyword">this"csharp plain">.markers[i]; } </div> <div class="line number52 index51 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.getLastValue = function() { "csharp keyword">return "csharp keyword">this"csharp plain">.markers["csharp keyword">this"csharp plain">.markers.length-1]; } </div> <div class="line number53 index52 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getValueById = function(ID) { </div> <div class="line number54 index53 alt1">"csharp spaces"> "csharp plain">var i; </div> <div class="line number55 index54 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<"csharp keyword">this"csharp plain">.markers.length;i++) </div> <div class="line number56 index55 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number57 index56 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">("csharp keyword">this"csharp plain">.markers[i].value==ID) </div> <div class="line number58 index57 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number59 index58 alt2">"csharp spaces"> "csharp comments">// alert('marker found : '+this.markers[i].value); </div> <div class="line number60 index59 alt1">"csharp spaces"> "csharp keyword">return "csharp keyword">this"csharp plain">.markers[i]; </div> <div class="line number61 index60 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number62 index61 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number63 index62 alt2">"csharp spaces"> "csharp keyword">return "csharp keyword">null"csharp plain">; </div> <div class="line number64 index63 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number65 index64 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.removeValueById = function(ID) { </div> <div class="line number66 index65 alt1">"csharp spaces"> "csharp plain">var i; </div> <div class="line number67 index66 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<"csharp keyword">this"csharp plain">.markers.length;i++) </div> <div class="line number68 index67 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number69 index68 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">("csharp keyword">this"csharp plain">.markers[i].value==ID) </div> <div class="line number70 index69 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number71 index70 alt2">"csharp spaces"> "csharp comments">// alert('marker found : '+this.markers[i].value); </div> <div class="line number72 index71 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.markers.splice(i,1); </div> <div class="line number73 index72 alt2">"csharp spaces"> "csharp comments">//alert('changed marker removed'); </div> <div class="line number74 index73 alt1">"csharp spaces"> </div> <div class="line number75 index74 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number76 index75 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number77 index76 alt2">"csharp spaces"> "csharp keyword">return "csharp keyword">null"csharp plain">; </div> <div class="line number78 index77 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number79 index78 alt2">"csharp plain">} </div> <div class="line number80 index79 alt1">"csharp spaces"> </div> <div class="line number81 index80 alt2">"csharp plain">function fPolylines() </div> <div class="line number82 index81 alt1">"csharp plain">{ </div> <div class="line number83 index82 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.polylines = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number84 index83 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.polylinesID = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number85 index84 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getLength = function() { "csharp keyword">return "csharp keyword">this"csharp plain">.polylines.length; }; </div> <div class="line number86 index85 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.pushValue = function(v,ID) { "csharp keyword">this"csharp plain">.polylines.push(v); "csharp keyword">this"csharp plain">.polylinesID.push(ID); } </div> <div class="line number87 index86 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getValue = function(i) { "csharp keyword">return "csharp keyword">this"csharp plain">.polylines[i]; } </div> <div class="line number88 index87 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.getLastValue = function() { "csharp keyword">return "csharp keyword">this"csharp plain">.polylines["csharp keyword">this"csharp plain">.polylines.length-1]; } </div> <div class="line number89 index88 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getValueById = function(ID) { </div> <div class="line number90 index89 alt1">"csharp spaces"> "csharp plain">var i; </div> <div class="line number91 index90 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<"csharp keyword">this"csharp plain">.polylinesID.length;i++) </div> <div class="line number92 index91 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number93 index92 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">("csharp keyword">this"csharp plain">.polylinesID[i]==ID) </div> <div class="line number94 index93 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number95 index94 alt2">"csharp spaces"> "csharp comments">// alert('polyline found : '+this.polylines[i].value); </div> <div class="line number96 index95 alt1">"csharp spaces"> "csharp keyword">return "csharp keyword">this"csharp plain">.polylines[i]; </div> <div class="line number97 index96 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number98 index97 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number99 index98 alt2">"csharp spaces"> "csharp keyword">return "csharp keyword">null"csharp plain">; </div> <div class="line number100 index99 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number101 index100 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.removeValueById = function(ID) { </div> <div class="line number102 index101 alt1">"csharp spaces"> "csharp plain">var i; </div> <div class="line number103 index102 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<"csharp keyword">this"csharp plain">.polylinesID.length;i++) </div> <div class="line number104 index103 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number105 index104 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">("csharp keyword">this"csharp plain">.polylinesID[i]==ID) </div> <div class="line number106 index105 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number107 index106 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.polylines.splice(i,1); </div> <div class="line number108 index107 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.polylinesID.splice(i,1); </div> <div class="line number109 index108 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number110 index109 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number111 index110 alt2">"csharp spaces"> "csharp keyword">return "csharp keyword">null"csharp plain">; </div> <div class="line number112 index111 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number113 index112 alt2">"csharp plain">} </div> <div class="line number114 index113 alt1">"csharp spaces"> </div> <div class="line number115 index114 alt2">"csharp plain">function fPolygons() </div> <div class="line number116 index115 alt1">"csharp plain">{ </div> <div class="line number117 index116 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.polygons = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number118 index117 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.polygonsID = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number119 index118 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getLength = function() { "csharp keyword">return "csharp keyword">this"csharp plain">.polygons.length; }; </div> <div class="line number120 index119 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.pushValue = function(v,ID) { "csharp keyword">this"csharp plain">.polygons.push(v); "csharp keyword">this"csharp plain">.polygonsID.push(ID); } </div> <div class="line number121 index120 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getValue = function(i) { "csharp keyword">return "csharp keyword">this"csharp plain">.polygons[i]; } </div> <div class="line number122 index121 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.getLastValue = function() { "csharp keyword">return "csharp keyword">this"csharp plain">.polygons["csharp keyword">this"csharp plain">.polygons.length-1]; } </div> <div class="line number123 index122 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.getValueById = function(ID) { </div> <div class="line number124 index123 alt1">"csharp spaces"> "csharp plain">var i; </div> <div class="line number125 index124 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<"csharp keyword">this"csharp plain">.polygonsID.length;i++) </div> <div class="line number126 index125 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number127 index126 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">("csharp keyword">this"csharp plain">.polygonsID[i]==ID) </div> <div class="line number128 index127 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number129 index128 alt2">"csharp spaces"> "csharp keyword">return "csharp keyword">this"csharp plain">.polygons[i]; </div> <div class="line number130 index129 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number131 index130 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number132 index131 alt1">"csharp spaces"> "csharp keyword">return "csharp keyword">null"csharp plain">; </div> <div class="line number133 index132 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number134 index133 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.removeValueById = function(ID) { </div> <div class="line number135 index134 alt2">"csharp spaces"> "csharp plain">var i; </div> <div class="line number136 index135 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<"csharp keyword">this"csharp plain">.polygonsID.length;i++) </div> <div class="line number137 index136 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number138 index137 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">("csharp keyword">this"csharp plain">.polygonsID[i]==ID) </div> <div class="line number139 index138 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number140 index139 alt1">"csharp spaces"> "csharp keyword">this"csharp plain">.polygons.splice(i,1); </div> <div class="line number141 index140 alt2">"csharp spaces"> "csharp keyword">this"csharp plain">.polygonsID.splice(i,1); </div> <div class="line number142 index141 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number143 index142 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number144 index143 alt1">"csharp spaces"> "csharp keyword">return "csharp keyword">null"csharp plain">; </div> <div class="line number145 index144 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number146 index145 alt1">"csharp plain">} </div> <div class="line number147 index146 alt2">"csharp spaces"> </div> <div class="line number148 index147 alt1">"csharp keyword">if "csharp plain">(GBrowserIsCompatible()) </div> <div class="line number149 index148 alt2">"csharp plain">{ </div> <div class="line number150 index149 alt1">"csharp comments">//debugger; </div> <div class="line number151 index150 alt2">"csharp comments">//GoogleMapForASPNet.OnSecondChange("Ghata"); </div> <div class="line number152 index151 alt1">"csharp spaces"> "csharp plain">map = "csharp keyword">new "csharp plain">GMap2(document.getElementById("csharp string">"GoogleMap_Div""csharp plain">)); </div> <div class="line number153 index152 alt2">"csharp spaces"> "csharp plain">map.addControl("csharp keyword">new "csharp plain">GOverviewMapControl()); "csharp comments">//添加鹰眼控件 </div> <div class="line number154 index153 alt1">"csharp spaces"> "csharp plain">map.enableGoogleBar(); "csharp comments">//显示google搜索框 </div> <div class="line number155 index154 alt2">"csharp spaces"> "csharp comments">// 比例尺控件 </div> <div class="line number156 index155 alt1">"csharp spaces"> "csharp plain">var scaleControl = "csharp keyword">new "csharp plain">GScaleControl(); </div> <div class="line number157 index156 alt2">"csharp spaces"> </div> <div class="line number158 index157 alt1">"csharp spaces"> </div> <div class="line number159 index158 alt2">"csharp plain">var markers = "csharp keyword">new "csharp plain">fMarkers(); </div> <div class="line number160 index159 alt1">"csharp plain">var polylines = "csharp keyword">new "csharp plain">fPolylines(); </div> <div class="line number161 index160 alt2">"csharp plain">var polygons = "csharp keyword">new "csharp plain">fPolygons(); </div> <div class="line number162 index161 alt1">"csharp comments">//var myEventListeners = new fListeners(); </div> <div class="line number163 index162 alt2">"csharp spaces"> </div> <div class="line number164 index163 alt1">"csharp plain">function CreateMarker(point,icon1,InfoHTML,bDraggable,sTitle) </div> <div class="line number165 index164 alt2">"csharp plain">{ </div> <div class="line number166 index165 alt1">"csharp spaces"> "csharp plain">var marker; </div> <div class="line number167 index166 alt2">"csharp comments">// if(icon!=null) </div> <div class="line number168 index167 alt1">"csharp comments">// { </div> <div class="line number169 index168 alt2">"csharp spaces"> "csharp plain">marker = "csharp keyword">new "csharp plain">GMarker(point,{icon:icon1,draggable:bDraggable,title: sTitle}); </div> <div class="line number170 index169 alt1">"csharp comments">// } </div> <div class="line number171 index170 alt2">"csharp comments">// else </div> <div class="line number172 index171 alt1">"csharp comments">// { </div> <div class="line number173 index172 alt2">"csharp comments">// marker = new GMarker(point); </div> <div class="line number174 index173 alt1">"csharp comments">// } </div> <div class="line number175 index174 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(InfoHTML!="csharp string">''"csharp plain">) </div> <div class="line number176 index175 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number177 index176 alt2">"csharp spaces"> "csharp comments">// vlisteners.pushValue(GEvent.addListener(marker, "click", function() { map.openInfoWindowHtml(point,InfoHTML); })); </div> <div class="line number178 index177 alt1">"csharp spaces"> "csharp plain">GEvent.addListener(marker, "csharp string">"click""csharp plain">, function() { map.openInfoWindowHtml(point,InfoHTML); }); </div> <div class="line number179 index178 alt2">"csharp spaces"> "csharp plain">GEvent.addListener(marker, "csharp string">"dragend""csharp plain">, function() { GService.SetLatLon("csharp keyword">this"csharp plain">.value,"csharp keyword">this"csharp plain">.getLatLng().y,"csharp keyword">this"csharp plain">.getLatLng().x);RaiseEvent("csharp string">'PushpinMoved'"csharp plain">,"csharp keyword">this"csharp plain">.value); }); </div> <div class="line number180 index179 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number181 index180 alt2">"csharp spaces"> "csharp keyword">return "csharp plain">marker; </div> <div class="line number182 index181 alt1">"csharp plain">} </div> <div class="line number183 index182 alt2">"csharp spaces"> </div> <div class="line number184 index183 alt1">"csharp plain">function CreatePolyline(points,color,width,isgeodesic) </div> <div class="line number185 index184 alt2">"csharp plain">{ </div> <div class="line number186 index185 alt1">"csharp spaces"> "csharp plain">var polyline; </div> <div class="line number187 index186 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(!isgeodesic) </div> <div class="line number188 index187 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number189 index188 alt2">"csharp spaces"> "csharp plain">polyline = "csharp keyword">new "csharp plain">GPolyline(points,color,width); </div> <div class="line number190 index189 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number191 index190 alt2">"csharp spaces"> "csharp keyword">else</div> <div class="line number192 index191 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number193 index192 alt2">"csharp spaces"> "csharp plain">var polyOptions = {geodesic:"csharp keyword">true"csharp plain">}; </div> <div class="line number194 index193 alt1">"csharp spaces"> "csharp plain">polyline = "csharp keyword">new "csharp plain">GPolyline(points,color,width,1,polyOptions); </div> <div class="line number195 index194 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number196 index195 alt1">"csharp spaces"> "csharp keyword">return "csharp plain">polyline; </div> <div class="line number197 index196 alt2">"csharp plain">} </div> <div class="line number198 index197 alt1">"csharp spaces"> </div> <div class="line number199 index198 alt2">"csharp plain">function CreatePolygon(points,strokecolor,strokeweight,strokeopacity,fillcolor,fillopacity) </div> <div class="line number200 index199 alt1">"csharp plain">{ </div> <div class="line number201 index200 alt2">"csharp spaces"> "csharp plain">var polygon; </div> <div class="line number202 index201 alt1">"csharp spaces"> </div> <div class="line number203 index202 alt2">"csharp spaces"> "csharp plain">var polygon = "csharp keyword">new "csharp plain">GPolygon(points,strokecolor,strokeweight,strokeopacity,fillcolor,fillopacity); </div> <div class="line number204 index203 alt1">"csharp spaces"> "csharp keyword">return "csharp plain">polygon; </div> <div class="line number205 index204 alt2">"csharp plain">} </div> <div class="line number206 index205 alt1">"csharp spaces"> </div> <div class="line number207 index206 alt2">"csharp plain">function fGetGoogleObject(result, userContext) </div> <div class="line number208 index207 alt1">"csharp plain">{ </div> <div class="line number209 index208 alt2">"csharp spaces"> "csharp plain">map.setCenter("csharp keyword">new "csharp plain">GLatLng(result.CenterPoint.Latitude, result.CenterPoint.Longitude), result.ZoomLevel); </div> <div class="line number210 index209 alt1">"csharp spaces"> </div> <div class="line number211 index210 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.ShowMapTypesControl) </div> <div class="line number212 index211 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number213 index212 alt2">"csharp spaces"> "csharp plain">map.addControl("csharp keyword">new "csharp plain">GMapTypeControl()); </div> <div class="line number214 index213 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number215 index214 alt2">"csharp spaces"> </div> <div class="line number216 index215 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(result.ShowZoomControl) </div> <div class="line number217 index216 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number218 index217 alt1">"csharp spaces"> "csharp plain">map.addControl("csharp keyword">new "csharp plain">GLargeMapControl()); </div> <div class="line number219 index218 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number220 index219 alt1">"csharp spaces"> </div> <div class="line number221 index220 alt2">"csharp spaces"> "csharp plain">var i; </div> <div class="line number222 index221 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(markers!="csharp keyword">null"csharp plain">) </div> <div class="line number223 index222 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number224 index223 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<markers.getLength();i++) </div> <div class="line number225 index224 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number226 index225 alt1">"csharp spaces"> "csharp plain">var cmark = markers.getValue(i); </div> <div class="line number227 index226 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(cmark !="csharp keyword">null"csharp plain">) </div> <div class="line number228 index227 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number229 index228 alt2">"csharp spaces"> "csharp plain">map.removeOverlay(cmark); </div> <div class="line number230 index229 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number231 index230 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number232 index231 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number233 index232 alt2">"csharp comments">// if(myEventListeners!=null) </div> <div class="line number234 index233 alt1">"csharp comments">// { </div> <div class="line number235 index234 alt2">"csharp comments">// for(i=0;i<myEventListeners.getLength();i++) </div> <div class="line number236 index235 alt1">"csharp comments">// { </div> <div class="line number237 index236 alt2">"csharp comments">// var lisnr = myEventListeners.getValue(i); </div> <div class="line number238 index237 alt1">"csharp comments">// if(lisnr!=null) </div> <div class="line number239 index238 alt2">"csharp comments">// { </div> <div class="line number240 index239 alt1">"csharp comments">// GEvent.removeListener(lisnr); </div> <div class="line number241 index240 alt2">"csharp comments">// } </div> <div class="line number242 index241 alt1">"csharp comments">// } </div> <div class="line number243 index242 alt2">"csharp comments">// } </div> <div class="line number244 index243 alt1">"csharp spaces"> "csharp plain">markers = "csharp keyword">new "csharp plain">fMarkers(); </div> <div class="line number245 index244 alt2">"csharp comments">// myEventListeners = new fListeners(); </div> <div class="line number246 index245 alt1">"csharp spaces"> </div> <div class="line number247 index246 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<result.Points.length;i++) </div> <div class="line number248 index247 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number249 index248 alt2">"csharp spaces"> "csharp plain">var myIcon_google; </div> <div class="line number250 index249 alt1">"csharp spaces"> </div> <div class="line number251 index250 alt2">"csharp spaces"> "csharp plain">var myPoint = "csharp keyword">new "csharp plain">GLatLng(result.Points[i].Latitude, result.Points[i].Longitude); </div> <div class="line number252 index251 alt1">"csharp spaces"> </div> <div class="line number253 index252 alt2">"csharp spaces"> "csharp plain">myIcon_google = "csharp keyword">null"csharp plain">; </div> <div class="line number254 index253 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Points[i].IconImage!="csharp string">''"csharp plain">) </div> <div class="line number255 index254 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number256 index255 alt1">"csharp spaces"> "csharp plain">myIcon_google = "csharp keyword">new "csharp plain">GIcon(G_DEFAULT_ICON); </div> <div class="line number257 index256 alt2">"csharp spaces"> "csharp plain">markerOptions = { icon:myIcon_google }; </div> <div class="line number258 index257 alt1">"csharp spaces"> </div> <div class="line number259 index258 alt2">"csharp spaces"> "csharp plain">myIcon_google.iconSize = "csharp keyword">new "csharp plain">GSize(result.Points[i].IconImageWidth,result.Points[i].IconImageHeight); </div> <div class="line number260 index259 alt1">"csharp spaces"> "csharp plain">myIcon_google.image = result.Points[i].IconImage; </div> <div class="line number261 index260 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number262 index261 alt1">"csharp spaces"> </div> <div class="line number263 index262 alt2">"csharp spaces"> "csharp plain">var marker = CreateMarker(myPoint,myIcon_google,result.Points[i].InfoHTML,result.Points[i].Draggable,result.Points[i].ToolTip); </div> <div class="line number264 index263 alt1">"csharp spaces"> "csharp plain">marker.value = result.Points[i].ID; </div> <div class="line number265 index264 alt2">"csharp spaces"> "csharp plain">markers.pushValue(marker); </div> <div class="line number266 index265 alt1">"csharp spaces"> "csharp plain">map.addOverlay(markers.getLastValue()); </div> <div class="line number267 index266 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number268 index267 alt1">"csharp spaces"> "csharp comments">//Add polylines </div> <div class="line number269 index268 alt2">"csharp spaces"> "csharp comments">// alert('adding polyline'); </div> <div class="line number270 index269 alt1">"csharp spaces"> </div> <div class="line number271 index270 alt2">"csharp spaces"> "csharp plain">polylines = "csharp keyword">new "csharp plain">fPolylines(); </div> <div class="line number272 index271 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<result.Polylines.length;i++) </div> <div class="line number273 index272 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number274 index273 alt1">"csharp spaces"> "csharp plain">var polypoints = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number275 index274 alt2">"csharp spaces"> "csharp plain">var j; </div> <div class="line number276 index275 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(j=0;j<result.Polylines[i].Points.length;j++) </div> <div class="line number277 index276 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number278 index277 alt1">"csharp spaces"> "csharp plain">polypoints.push("csharp keyword">new "csharp plain">GLatLng(result.Polylines[i].Points[j].Latitude, result.Polylines[i].Points[j].Longitude)); </div> <div class="line number279 index278 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number280 index279 alt1">"csharp spaces"> "csharp plain">var polyline = CreatePolyline(polypoints,result.Polylines[i].ColorCode,result.Polylines[i].Width,result.Polylines[i].Geodesic); </div> <div class="line number281 index280 alt2">"csharp spaces"> "csharp plain">polylines.pushValue(polyline,result.Polylines[i].ID); </div> <div class="line number282 index281 alt1">"csharp spaces"> "csharp plain">map.addOverlay(polylines.getLastValue()); </div> <div class="line number283 index282 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number284 index283 alt1">"csharp comments">// var polypoints = new Array(); </div> <div class="line number285 index284 alt2">"csharp comments">// polypoints.push(new GLatLng(43.65669, -79.44268)); </div> <div class="line number286 index285 alt1">"csharp comments">// polypoints.push(new GLatLng(43.66619, -79.44268)); </div> <div class="line number287 index286 alt2">"csharp comments">// var poly = CreatePolyline(polypoints,"#66FF00",10,true); </div> <div class="line number288 index287 alt1">"csharp comments">// map.addOverlay(poly); </div> <div class="line number289 index288 alt2">"csharp spaces"> </div> <div class="line number290 index289 alt1">"csharp comments">// var polypoints = new Array(); </div> <div class="line number291 index290 alt2">"csharp comments">// polypoints.push(new GLatLng(43.65669, -79.44268)); </div> <div class="line number292 index291 alt1">"csharp comments">// polypoints.push(new GLatLng(43.66619, -79.44268)); </div> <div class="line number293 index292 alt2">"csharp comments">// polypoints.push(new GLatLng(43.67619, -79.44268)); </div> <div class="line number294 index293 alt1">"csharp comments">// var directions = new GDirections(map,document.getElementById("directions_canvas")); </div> <div class="line number295 index294 alt2">"csharp comments">//Clear the mapa nd directions of any old information </div> <div class="line number296 index295 alt1">"csharp comments">//directions.clear(); </div> <div class="line number297 index296 alt2">"csharp spaces"> </div> <div class="line number298 index297 alt1">"csharp comments">//Load the map and directions from the specified waypoints </div> <div class="line number299 index298 alt2">"csharp comments">//directions.loadFromWaypoints(polypoints); </div> <div class="line number300 index299 alt1">"csharp spaces"> </div> <div class="line number301 index300 alt2">"csharp spaces"> </div> <div class="line number302 index301 alt1">"csharp spaces"> "csharp plain">polygons = "csharp keyword">new "csharp plain">fPolygons(); </div> <div class="line number303 index302 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<result.Polygons.length;i++) </div> <div class="line number304 index303 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number305 index304 alt2">"csharp spaces"> "csharp plain">var polypoints = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number306 index305 alt1">"csharp spaces"> "csharp plain">var j; </div> <div class="line number307 index306 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(j=0;j<result.Polygons[i].Points.length;j++) </div> <div class="line number308 index307 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number309 index308 alt2">"csharp spaces"> "csharp plain">polypoints.push("csharp keyword">new "csharp plain">GLatLng(result.Polygons[i].Points[j].Latitude, result.Polygons[i].Points[j].Longitude)); </div> <div class="line number310 index309 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number311 index310 alt2">"csharp spaces"> "csharp plain">var polygon = CreatePolygon(polypoints,result.Polygons[i].StrokeColor,result.Polygons[i].StrokeWeight,result.Polygons[i].StrokeOpacity,result.Polygons[i].FillColor,result.Polygons[i].FillOpacity); </div> <div class="line number312 index311 alt1">"csharp spaces"> "csharp plain">polygons.pushValue(polygon,result.Polygons[i].ID); </div> <div class="line number313 index312 alt2">"csharp spaces"> "csharp plain">map.addOverlay(polygons.getLastValue()); </div> <div class="line number314 index313 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number315 index314 alt2">"csharp spaces"> </div> <div class="line number316 index315 alt1">"csharp spaces"> </div> <div class="line number317 index316 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.ShowTraffic) </div> <div class="line number318 index317 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number319 index318 alt2">"csharp spaces"> "csharp plain">trafficInfo = "csharp keyword">new "csharp plain">GTrafficOverlay(); </div> <div class="line number320 index319 alt1">"csharp spaces"> "csharp plain">map.addOverlay(trafficInfo); </div> <div class="line number321 index320 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number322 index321 alt1">"csharp plain">} </div> <div class="line number323 index322 alt2">"csharp spaces"> "csharp plain">GService.GetGoogleObject(fGetGoogleObject); </div> <div class="line number324 index323 alt1">"csharp spaces"> </div> <div class="line number325 index324 alt2">"csharp plain">function fGetGoogleObjectOptimized(result, userContext) </div> <div class="line number326 index325 alt1">"csharp plain">{ </div> <div class="line number327 index326 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.RecenterMap) </div> <div class="line number328 index327 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number329 index328 alt2">"csharp spaces"> "csharp plain">map.setCenter("csharp keyword">new "csharp plain">GLatLng(result.CenterPoint.Latitude, result.CenterPoint.Longitude), result.ZoomLevel); </div> <div class="line number330 index329 alt1">"csharp spaces"> "csharp plain">GService.RecenterMapComplete(); </div> <div class="line number331 index330 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number332 index331 alt1">"csharp spaces"> </div> <div class="line number333 index332 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.ShowTraffic) </div> <div class="line number334 index333 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number335 index334 alt2">"csharp spaces"> "csharp plain">trafficInfo = "csharp keyword">new "csharp plain">GTrafficOverlay(); </div> <div class="line number336 index335 alt1">"csharp spaces"> "csharp plain">map.addOverlay(trafficInfo); </div> <div class="line number337 index336 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number338 index337 alt1">"csharp spaces"> "csharp keyword">else</div> <div class="line number339 index338 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number340 index339 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(trafficInfo!="csharp keyword">null"csharp plain">) </div> <div class="line number341 index340 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number342 index341 alt1">"csharp spaces"> "csharp plain">map.removeOverlay(trafficInfo); </div> <div class="line number343 index342 alt2">"csharp spaces"> "csharp plain">trafficInfo = "csharp keyword">null"csharp plain">; </div> <div class="line number344 index343 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number345 index344 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number346 index345 alt1">"csharp spaces"> </div> <div class="line number347 index346 alt2">"csharp spaces"> "csharp plain">var i; </div> <div class="line number348 index347 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<result.Points.length;i++) </div> <div class="line number349 index348 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number350 index349 alt1">"csharp spaces"> "csharp comments">//Create icon </div> <div class="line number351 index350 alt2">"csharp spaces"> "csharp plain">var myIcon_google; </div> <div class="line number352 index351 alt1">"csharp spaces"> </div> <div class="line number353 index352 alt2">"csharp spaces"> "csharp plain">var myPoint = "csharp keyword">new "csharp plain">GLatLng(result.Points[i].Latitude, result.Points[i].Longitude); </div> <div class="line number354 index353 alt1">"csharp spaces"> </div> <div class="line number355 index354 alt2">"csharp spaces"> "csharp plain">myIcon_google = "csharp keyword">null"csharp plain">; </div> <div class="line number356 index355 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Points[i].IconImage!="csharp string">''"csharp plain">) </div> <div class="line number357 index356 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number358 index357 alt1">"csharp spaces"> "csharp plain">myIcon_google = "csharp keyword">new "csharp plain">GIcon(G_DEFAULT_ICON); </div> <div class="line number359 index358 alt2">"csharp spaces"> "csharp plain">markerOptions = { icon:myIcon_google }; </div> <div class="line number360 index359 alt1">"csharp spaces"> </div> <div class="line number361 index360 alt2">"csharp spaces"> "csharp plain">myIcon_google.iconSize = "csharp keyword">new "csharp plain">GSize(result.Points[i].IconImageWidth,result.Points[i].IconImageHeight); </div> <div class="line number362 index361 alt1">"csharp spaces"> "csharp plain">myIcon_google.image = result.Points[i].IconImage; </div> <div class="line number363 index362 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number364 index363 alt1">"csharp spaces"> "csharp comments">//Existing marker, but changed. </div> <div class="line number365 index364 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Points[i].PointStatus=="csharp string">'C'"csharp plain">) </div> <div class="line number366 index365 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number367 index366 alt2">"csharp spaces"> "csharp plain">var marker = markers.getValueById(result.Points[i].ID); </div> <div class="line number368 index367 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(marker!="csharp keyword">null"csharp plain">) </div> <div class="line number369 index368 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number370 index369 alt1">"csharp spaces"> "csharp plain">markers.removeValueById(result.Points[i].ID); </div> <div class="line number371 index370 alt2">"csharp spaces"> "csharp plain">map.removeOverlay(marker); </div> <div class="line number372 index371 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number373 index372 alt2">"csharp spaces"> "csharp plain">var marker = CreateMarker(myPoint,myIcon_google,result.Points[i].InfoHTML,result.Points[i].Draggable,result.Points[i].ToolTip); </div> <div class="line number374 index373 alt1">"csharp spaces"> "csharp plain">marker.value = result.Points[i].ID; </div> <div class="line number375 index374 alt2">"csharp spaces"> "csharp plain">markers.pushValue(marker); </div> <div class="line number376 index375 alt1">"csharp spaces"> "csharp plain">map.addOverlay(markers.getLastValue()); </div> <div class="line number377 index376 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number378 index377 alt1">"csharp spaces"> "csharp comments">//New Marker </div> <div class="line number379 index378 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Points[i].PointStatus=="csharp string">'N'"csharp plain">) </div> <div class="line number380 index379 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number381 index380 alt2">"csharp spaces"> "csharp plain">var marker = CreateMarker(myPoint,myIcon_google,result.Points[i].InfoHTML,result.Points[i].Draggable,result.Points[i].ToolTip); </div> <div class="line number382 index381 alt1">"csharp spaces"> "csharp plain">marker.value = result.Points[i].ID; </div> <div class="line number383 index382 alt2">"csharp spaces"> "csharp plain">markers.pushValue(marker); </div> <div class="line number384 index383 alt1">"csharp spaces"> "csharp plain">map.addOverlay(markers.getLastValue()); </div> <div class="line number385 index384 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number386 index385 alt1">"csharp spaces"> "csharp comments">//Existing marker, but deleted. </div> <div class="line number387 index386 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Points[i].PointStatus=="csharp string">'D'"csharp plain">) </div> <div class="line number388 index387 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number389 index388 alt2">"csharp spaces"> "csharp plain">var marker = markers.getValueById(result.Points[i].ID); </div> <div class="line number390 index389 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(marker!="csharp keyword">null"csharp plain">) </div> <div class="line number391 index390 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number392 index391 alt1">"csharp spaces"> "csharp plain">markers.removeValueById(result.Points[i].ID); </div> <div class="line number393 index392 alt2">"csharp spaces"> "csharp plain">map.removeOverlay(marker); </div> <div class="line number394 index393 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number395 index394 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number396 index395 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number397 index396 alt2">"csharp spaces"> </div> <div class="line number398 index397 alt1">"csharp spaces"> "csharp comments">//Get Polylines </div> <div class="line number399 index398 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<result.Polylines.length;i++) </div> <div class="line number400 index399 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number401 index400 alt2">"csharp spaces"> "csharp comments">//Existing marker, but changed. </div> <div class="line number402 index401 alt1">"csharp spaces"> </div> <div class="line number403 index402 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Polylines[i].LineStatus=="csharp string">'C'"csharp plain">) </div> <div class="line number404 index403 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number405 index404 alt2">"csharp spaces"> </div> <div class="line number406 index405 alt1">"csharp spaces"> "csharp plain">var polyline = polylines.getValueById(result.Polylines[i].ID); </div> <div class="line number407 index406 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(polyline!="csharp keyword">null"csharp plain">) </div> <div class="line number408 index407 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number409 index408 alt2">"csharp spaces"> "csharp plain">polylines.removeValueById(result.Polylines[i].ID); </div> <div class="line number410 index409 alt1">"csharp spaces"> "csharp plain">map.removeOverlay(polyline); </div> <div class="line number411 index410 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number412 index411 alt1">"csharp spaces"> "csharp plain">var polypoints = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number413 index412 alt2">"csharp spaces"> "csharp plain">var j; </div> <div class="line number414 index413 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(j=0;j<result.Polylines[i].Points.length;j++) </div> <div class="line number415 index414 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number416 index415 alt1">"csharp spaces"> "csharp plain">polypoints.push("csharp keyword">new "csharp plain">GLatLng(result.Polylines[i].Points[j].Latitude, result.Polylines[i].Points[j].Longitude)); </div> <div class="line number417 index416 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number418 index417 alt1">"csharp spaces"> "csharp plain">var polyline = CreatePolyline(polypoints,result.Polylines[i].ColorCode,result.Polylines[i].Width,result.Polylines[i].Geodesic); </div> <div class="line number419 index418 alt2">"csharp spaces"> "csharp plain">polylines.pushValue(polyline,result.Polylines[i].ID); </div> <div class="line number420 index419 alt1">"csharp spaces"> "csharp plain">map.addOverlay(polylines.getLastValue()); </div> <div class="line number421 index420 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number422 index421 alt1">"csharp spaces"> "csharp comments">//New Marker </div> <div class="line number423 index422 alt2">"csharp spaces"> </div> <div class="line number424 index423 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Polylines[i].LineStatus=="csharp string">'N'"csharp plain">) </div> <div class="line number425 index424 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number426 index425 alt1">"csharp spaces"> "csharp plain">var polypoints = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number427 index426 alt2">"csharp spaces"> "csharp plain">var j; </div> <div class="line number428 index427 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(j=0;j<result.Polylines[i].Points.length;j++) </div> <div class="line number429 index428 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number430 index429 alt1">"csharp spaces"> "csharp plain">polypoints.push("csharp keyword">new "csharp plain">GLatLng(result.Polylines[i].Points[j].Latitude, result.Polylines[i].Points[j].Longitude)); </div> <div class="line number431 index430 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number432 index431 alt1">"csharp spaces"> "csharp plain">var polyline = CreatePolyline(polypoints,result.Polylines[i].ColorCode,result.Polylines[i].Width,result.Polylines[i].Geodesic); </div> <div class="line number433 index432 alt2">"csharp spaces"> "csharp plain">polylines.pushValue(polyline,result.Polylines[i].ID); </div> <div class="line number434 index433 alt1">"csharp spaces"> "csharp plain">map.addOverlay(polylines.getLastValue()); </div> <div class="line number435 index434 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number436 index435 alt1">"csharp spaces"> "csharp comments">//Existing marker, but deleted. </div> <div class="line number437 index436 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Polylines[i].LineStatus=="csharp string">'D'"csharp plain">) </div> <div class="line number438 index437 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number439 index438 alt2">"csharp spaces"> "csharp plain">var polyline = polylines.getValueById(result.Polylines[i].ID); </div> <div class="line number440 index439 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(polyline!="csharp keyword">null"csharp plain">) </div> <div class="line number441 index440 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number442 index441 alt1">"csharp spaces"> "csharp plain">polylines.removeValueById(result.Polylines[i].ID); </div> <div class="line number443 index442 alt2">"csharp spaces"> "csharp plain">map.removeOverlay(polyline); </div> <div class="line number444 index443 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number445 index444 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number446 index445 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number447 index446 alt2">"csharp spaces"> </div> <div class="line number448 index447 alt1">"csharp spaces"> "csharp comments">//Get Polygons </div> <div class="line number449 index448 alt2">"csharp spaces"> "csharp keyword">for"csharp plain">(i=0;i<result.Polygons.length;i++) </div> <div class="line number450 index449 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number451 index450 alt2">"csharp spaces"> "csharp comments">//Existing marker, but changed. </div> <div class="line number452 index451 alt1">"csharp spaces"> </div> <div class="line number453 index452 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Polygons[i].Status=="csharp string">'C'"csharp plain">) </div> <div class="line number454 index453 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number455 index454 alt2">"csharp spaces"> </div> <div class="line number456 index455 alt1">"csharp spaces"> "csharp plain">var polygon = polygons.getValueById(result.Polygons[i].ID); </div> <div class="line number457 index456 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(polygon!="csharp keyword">null"csharp plain">) </div> <div class="line number458 index457 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number459 index458 alt2">"csharp spaces"> "csharp plain">polygons.removeValueById(result.Polygons[i].ID); </div> <div class="line number460 index459 alt1">"csharp spaces"> "csharp plain">map.removeOverlay(polygon); </div> <div class="line number461 index460 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number462 index461 alt1">"csharp spaces"> "csharp plain">var polypoints = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number463 index462 alt2">"csharp spaces"> "csharp plain">var j; </div> <div class="line number464 index463 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(j=0;j<result.Polygons[i].Points.length;j++) </div> <div class="line number465 index464 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number466 index465 alt1">"csharp spaces"> "csharp plain">polypoints.push("csharp keyword">new "csharp plain">GLatLng(result.Polygons[i].Points[j].Latitude, result.Polygons[i].Points[j].Longitude)); </div> <div class="line number467 index466 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number468 index467 alt1">"csharp spaces"> "csharp plain">var polygon = CreatePolygon(polypoints,result.Polygons[i].StrokeColor,result.Polygons[i].StrokeWeight,result.Polygons[i].StrokeOpacity,result.Polygons[i].FillColor,result.Polygons[i].FillOpacity); </div> <div class="line number469 index468 alt2">"csharp spaces"> "csharp plain">polygons.pushValue(polygon,result.Polygons[i].ID); </div> <div class="line number470 index469 alt1">"csharp spaces"> "csharp plain">map.addOverlay(polygons.getLastValue()); </div> <div class="line number471 index470 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number472 index471 alt1">"csharp spaces"> "csharp comments">//New Marker </div> <div class="line number473 index472 alt2">"csharp spaces"> </div> <div class="line number474 index473 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Polygons[i].Status=="csharp string">'N'"csharp plain">) </div> <div class="line number475 index474 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number476 index475 alt1">"csharp spaces"> "csharp plain">var polypoints = "csharp keyword">new "csharp plain">Array(); </div> <div class="line number477 index476 alt2">"csharp spaces"> "csharp plain">var j; </div> <div class="line number478 index477 alt1">"csharp spaces"> "csharp keyword">for"csharp plain">(j=0;j<result.Polygons[i].Points.length;j++) </div> <div class="line number479 index478 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number480 index479 alt1">"csharp spaces"> "csharp plain">polypoints.push("csharp keyword">new "csharp plain">GLatLng(result.Polygons[i].Points[j].Latitude, result.Polygons[i].Points[j].Longitude)); </div> <div class="line number481 index480 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number482 index481 alt1">"csharp spaces"> "csharp plain">var polygon = CreatePolygon(polypoints,result.Polygons[i].StrokeColor,result.Polygons[i].StrokeWeight,result.Polygons[i].StrokeOpacity,result.Polygons[i].FillColor,result.Polygons[i].FillOpacity); </div> <div class="line number483 index482 alt2">"csharp spaces"> "csharp plain">polygons.pushValue(polygon,result.Polygons[i].ID); </div> <div class="line number484 index483 alt1">"csharp spaces"> "csharp plain">map.addOverlay(polygons.getLastValue()); </div> <div class="line number485 index484 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number486 index485 alt1">"csharp spaces"> "csharp comments">//Existing marker, but deleted. </div> <div class="line number487 index486 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(result.Polygons[i].Status=="csharp string">'D'"csharp plain">) </div> <div class="line number488 index487 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number489 index488 alt2">"csharp spaces"> "csharp plain">var polygon = polygons.getValueById(result.Polygons[i].ID); </div> <div class="line number490 index489 alt1">"csharp spaces"> "csharp keyword">if"csharp plain">(polygon!="csharp keyword">null"csharp plain">) </div> <div class="line number491 index490 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number492 index491 alt1">"csharp spaces"> "csharp plain">polygons.removeValueById(result.Polygons[i].ID); </div> <div class="line number493 index492 alt2">"csharp spaces"> "csharp plain">map.removeOverlay(polygon); </div> <div class="line number494 index493 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number495 index494 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number496 index495 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number497 index496 alt2">"csharp plain">} </div> <div class="line number498 index497 alt1">"csharp spaces"> </div> <div class="line number499 index498 alt2">"csharp plain">} </div> <div class="line number500 index499 alt1">"csharp plain">function endRequestHandler(sender, args) </div> <div class="line number501 index500 alt2">"csharp spaces"> "csharp plain">{ </div> <div class="line number502 index501 alt1">"csharp spaces"> "csharp comments">//alert('hi'); </div> <div class="line number503 index502 alt2">"csharp spaces"> "csharp plain">GService.GetOptimizedGoogleObject(fGetGoogleObjectOptimized); </div> <div class="line number504 index503 alt1">"csharp spaces"> "csharp plain">} </div> <div class="line number505 index504 alt2">"csharp spaces"> "csharp plain">function pageLoad() </div> <div class="line number506 index505 alt1">"csharp spaces"> "csharp plain">{ </div> <div class="line number507 index506 alt2">"csharp spaces"> "csharp keyword">if"csharp plain">(!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) </div> <div class="line number508 index507 alt1">"csharp spaces"> "csharp plain">Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler); </div> <div class="line number509 index508 alt2">"csharp spaces"> "csharp plain">} </div> <div class="line number510 index509 alt1">"csharp plain"></script></div> </div> </div>
试试其它关键字
google地图
同语言下
.
gzip压缩
.
实现http多线程断点续传下载文件
.
实现多线程断点续传下载大文件
.
生成字符串的 CheckSum
.
根据 UserAgent 获取浏览器的类型和版本
.
根据 Agent 判断是否是智能手机
.
隐藏手机号中间四位为*方法
.
合并图片(二维码和其他图片合并)
.
ASP.NET CORE中判断是否移动端打开网页
.
ASP.NET(C#)实现页面计时(定时)自动跳转
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
Dezai.CN
贡献的其它代码
(
4037
)
.
多线程Socket服务器模块
.
生成随机密码
.
清除浮动样式
.
弹出窗口居中
.
抓取url的函数
.
使用base HTTP验证
.
div模拟iframe嵌入效果
.
通过header转向的方法
.
Session操作类
.
执行sqlite输入插入操作后获得自动编号的ID
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3