[script type="text/javascript"]
var map = null;
var mapClickListener = null;
var routePoints = new Array();
var routeMarkers = new Array();
var routeOverlays = new Array();
var totalDistance = 0.0;
var lineIx = 0;
var mylistener;
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"), { draggableCursor: 'default', draggingCursor: 'pointer' });
map.setCenter(new GLatLng(45.0, 7.0), 3);
var customUI = map.getDefaultUI();
customUI.controls.maptypecontrol = false;
customUI.controls.menumaptypecontrol = true;
map.setUI(customUI);
geocoder = new GClientGeocoder();
GEvent.addListener(map, "mousemove", function(point) {
mousemovepoint = point;
var LnglatStr6 = point.lng().toFixed(6) + ', ' + point.lat().toFixed(6);
var latLngStr6 = point.lat().toFixed(6) + ', ' + point.lng().toFixed(6);
});
DrawRoute();
}
}
function DrawRoute() {
var strValue = '<%=strGeoPoints%>';
var strItems = strValue.split('$');
var dist = 0;
if (!routePoints[lineIx]) {
routePoints[lineIx] = Array();
routeMarkers[lineIx] = Array();
}
for (i = 0; i < strItems.length; i++) {
var item = new String(strItems[i]);
var index = item.indexOf(',');
if (index != -1) {
var point = new GLatLng(item.substring(index + 1), item.substring(0, index));
routePoints[lineIx].push(point);
plotRoute();
}
}
plotRoute();
}
function plotRoute() {
if (routeOverlays[lineIx]) {
map.removeOverlay(routeOverlays[lineIx]);
}
routeOverlays[lineIx] = new GPolyline(routePoints[lineIx], '#C602C8', 3, 1);
map.addOverlay(routeOverlays[lineIx]);
}
[/script]
[body onload="load()" onunload="GUnload()"]
[form id="form1" runat="server"]
[div id="map" style="width: 950px; height: 600px"]
[/div]
[/form]
[/body]
[strGeoPoints = "72.949219,29.036961$ 73.388672,29.954935$ 73.916016,30.145127$ 73.916016,30.410782$ 74.223633,30.751278$ 74.575195,31.052934$ 74.575195,31.466154$ 74.487305,31.728167$ 74.663086,31.989442$ 75.19043,32.175612$ 75.146484,32.435613$ 74.663086,32.583849$ 74.619141,33.063924$ 74.135742,33.211116$ 73.608398,33.211116$ 73.388672,34.016242$ 73.300781,34.415973$ 73.520508,34.597042$ 73.78418,34.813803$ 74.135742,35.137879$ 73.652344,35.317366$ 73.652344,35.56798$ 73.256836,35.56798$ 73.081055,35.817813$ 72.509766,35.817813$ 72.729492,36.173357$ 72.905273,36.385913$ 73.212891,36.5626$ 73.520508,36.774092$ 73.916016,36.738884$ 73.916016,36.949892$ 74.355469,36.949892$ 74.707031,36.985003$ 75.234375,36.985003$ 75.585938,36.914764$ 75.849609,36.597889$ 76.333008,36.315125$ 76.816406,36.102376$ 77.255859,35.746512$ 77.651367,35.532226$ 78.178711,35.639441$ 78.793945,35.85344$ 79.145508,35.995785$ 79.584961,35.85344$ 80.024414,35.56798$ 80.112305,35.209722$ 80.112305,34.885931$ 79.628906,34.415973$ 79.40918,34.089061$ 78.881836,33.797409$ 78.969727,33.431441$ 79.145508,32.953368$ 79.277344,32.583849$ 78.881836,32.324276$ 78.530273,32.546813$ 78.618164,32.063956$ 78.837891,31.466154$ 79.145508,31.090574$ 79.541016,31.052934$ 80.288086,30.637912$ 80.771484,30.183122$ 81.166992,30.107118$ 81.430664,30.334954$ 81.870117,30.297018$ 82.177734,30.107118$ 82.529297,29.840644$ 83.012695,29.61167$ 83.320313,29.42046$ 83.583984,29.267233$ 84.067383,29.267233$ 84.287109,28.844674$ 84.814453,28.652031$ 85.253906,28.652031$ 85.297852,28.265682$ 85.737305,28.033198$ 87.319336,27.916767$ 88.286133,27.955591$ 88.681641,28.033198$ 89.296875,27.683528$ 89.560547,28.07198$ 90.307617,28.188244$ 90.74707,27.994401$ 91.582031,27.955591$ 92.109375,27.80021$ 92.548828,27.994401$ 92.944336,28.459033$ 93.735352,28.72913$ 94.350586,29.113775$ 94.96582,29.152161$ 95.932617,29.305561$ 96.328125,29.036961$ 96.723633,28.690588$ 97.338867,28.149503$ 97.163086,27.839076$ 96.943359,27.605671$ 96.987305,27.176469$ 96.328125,27.332735$ 95.800781,26.980829$ 95.229492,26.863281$ 95.009766,26.076521$ 94.526367,25.363882$ 94.790039,25.125393$ 94.438477,24.647017$ 94.086914,23.885838$ 93.295898,24.126702$ 93.383789,23.281719$ 93.032227,22.998852$ 93.032227,22.22809$ 92.636719,21.983801$ 92.460938,22.390714$ 92.373047,23.039298$ 92.329102,23.604262$ 92.021484,23.684774$ 91.582031,23.079732$ 91.142578,23.684774$ 91.230469,24.126702$ 91.845703,24.487149$ 92.197266,24.806681$ 92.329102,25.125393$ 91.713867,25.125393$ 90.966797,25.284438$ 90.175781,25.284438$ 89.912109,25.244696$ 89.604492,25.244696$ 89.296875,24.647017$ 89.648438,24.046464$ 89.868164,23.765237$ 90.395508,23.241346$ 90.65918,22.674847$ 90.615234,22.268764$ 90.087891,21.779905$ 89.472656,21.820708$ 88.901367,22.065278$ 88.549805,22.268764$ 88.022461,22.105999$ 87.890625,21.739091$ 87.319336,21.493964$ 86.835938,21.453069$ 86.835938,20.797201$ 86.572266,20.055931$ 85.517578,19.808054$ 84.990234,19.394068$ 84.375,18.646245$ 83.540039,17.978733$ 82.836914,17.518344$ 82.177734,17.224758$ 82.30957,16.636192$ 81.518555,16.383391$ 80.991211,15.876809$ 80.332031,15.623037$ 80.112305,15.114553$ 80.288086,14.179186$ 80.288086,13.368243$ 80.200195,12.511665$ 79.716797,11.910354$ 79.848633,11.135287$ 79.672852,10.401378$ 79.189453,10.09867$ 78.837891,9.449062$ 78.354492,9.145486$ 78.222656,8.581021$ 77.519531,8.015716$ 76.948242,8.233237$ 76.464844,8.971897$ 76.420898,9.709057$ 76.157227,10.444598$ 75.849609,11.307708$ 75.234375,12.039321$ 74.663086,13.154376$ 74.443359,14.221789$ 73.78418,15.326572$ 73.432617,16.256867$ 73.037109,17.769612$ 72.817383,19.020577$ 72.817383,20.220966$ 72.861328,20.920397$ 72.773438,21.739091$ 72.685547,22.105999$ 72.333984,22.146708$ 72.158203,21.534847$ 71.806641,21.125498$ 71.103516,20.797201$ 70.664063,20.797201$ 70.048828,21.207459$ 69.65332,21.534847$ 69.125977,21.983801$ 68.818359,22.309426$ 69.169922,22.471955$ 69.829102,22.471955$ 70.3125,22.593726$ 70.356445,22.998852$ 70.048828,23.120154$ 69.477539,22.917923$ 68.950195,22.958393$ 68.598633,23.563987$ 68.90625,24.20689$ 69.609375,24.20689$ 70.180664,24.246965$ 70.883789,24.287027$ 71.103516,24.766785$ 70.708008,25.482951$ 70.576172,25.720735$ 70.224609,25.720735$ 70.136719,25.878994$ 70.136719,26.509905$ 69.477539,26.74561$ 69.56543,27.215556$ 70.092773,27.722436$ 70.356445,28.033198$ 70.708008,27.877928$ 71.806641,28.07198$ 72.114258,28.304381$ 72.246094,28.72913$ 72.641602,28.921631$ 72.949219,29.036961";]
No comments:
Post a Comment