source: trunk/Modules/Map/jscode.js@ 586

Last change on this file since 586 was 474, checked in by chronos, 12 years ago
  • Upraveno: Mapa sítě přepracována na aplikační modul.
File size: 45.7 KB
Line 
1var lastbounds;
2var lastzoom;
3var points = new Array();
4var pointsInfo = new Array();
5var texts = new Array();
6var textsInfo = new Array();
7var travelLinesA;
8var travelLinesH;
9var nameTextLocs;
10var nameTextZones;
11var numPoints=0;
12var maxPoints=250;
13var map;
14var markers;
15var i=0;
16var cmpltdrqst=0;
17var newrequest=0;
18var icon = new GIcon();
19var timeOut = 100;
20var lMessage;
21
22var herbs = new Array(
23'Arthas\' Tears',
24'Black Lotus',
25'Blindweed',
26'Briarthorn',
27'Bruiseweed',
28'Dreamfoil',
29'Earthroot',
30'Fadeleaf',
31'Firebloom',
32'Ghost Mushroom',
33'Golden Sansam',
34'Goldthorn',
35'Grave Moss',
36'Gromsblood',
37'Icecap',
38'Khadgar\'s Whisker',
39'Kingsblood',
40'Liferoot',
41'Mageroyal',
42'Mountain Silversage',
43'Peacebloom',
44'Plaguebloom',
45'Purple Lotus',
46'Silverleaf',
47'Stranglekelp',
48'Sungrass',
49'Wild Steelbloom',
50'Wintersbite'
51);
52
53var ore = new Array(
54'Copper Vein',
55'Dark Iron Ore',
56'Gold Vein',
57'Ooze Covered Gold Vein',
58'Incendicite Mineral Vein',
59'Iron Deposit',
60'Lesser Bloodstone Deposit',
61'Mithril Deposit',
62'Ooze Covered Mithril Deposit',
63'Silver Vein',
64'Ooze Covered Silver Vein',
65'Small Thorium Vein',
66'Ooze Covered Thorium Vein',
67'Rich Thorium Vein',
68'Ooze Covered Rich Thorium Vein',
69'Tin Vein',
70'Truesilver Deposit',
71'Ooze Covered Truesilver Deposit'
72);
73
74var treasure = new Array(
75'Alliance Chest',
76'Armor Crate',
77'Atal\'ai Artifact',
78'Barrel of Melon Juice',
79'Barrel of Milk',
80'Barrel of Sweet Nectar',
81'Battered Chest',
82'Blood of Heroes',
83'Bloodpetal Sprout',
84'Box of Assorted Parts',
85'Crate of Foodstuffs',
86'Crate with Holes',
87'Document Chest',
88'Excavation Supply Crate',
89'Food Crate',
90'Giant Clam',
91'Horde Chest',
92'Horde Supply Crate',
93'Rusty Chest',
94'Scattered Crate',
95'Solid Chest',
96'Un\'goro Dirt Pile',
97'Water Barrel',
98'Weapon Crate'
99);
100
101lastzoom=1;
102
103function getURLParam(strParamName){
104 var strReturn = "";
105 var strHref = window.location.href;
106 if ( strHref.indexOf("?") > -1 ){
107 var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
108 var aQueryString = strQueryString.split("&");
109 for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
110 if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
111 var aParam = aQueryString[iParam].split("=");
112 strReturn = aParam[1];
113 break;
114 }
115 }
116 }
117 return strReturn;
118}
119
120function a_trim(str) {
121 return str?str.replace(/^\s*|\s*$/g,""):"";
122}
123
124function writeCheckboxes(arrayRes, checked) //checked=true if they should be checked by default
125{
126//makes checkboxes to look like the following:
127// &nbsp;&nbsp; <input type=checkbox CHECKED=true name=kingsbloodOLD onClick="refreshIcons(this);" >
128// <a href="" onClick="toggleCheckbox('kingsblood'); return false;">Kingsblood</a></input><br>
129
130 for (var i in arrayRes)
131 {
132 document.writeln(
133 '&nbsp;&nbsp; <input type=checkbox ' + (checked?'CHECKED=true':'') + ' name=\"' + arrayRes[i].toLowerCase().replace(/'/,'&#39;') + '\" onClick="refreshIcons(this);" >'
134 );
135 document.writeln(
136 ' <a href="" onClick="toggleCheckbox(\'' + (arrayRes[i].toLowerCase()).replace(/'/,'\\\'') + '\'); return false;">' + arrayRes[i] + '</a></input><br>'
137 );
138 }
139}
140
141function refreshLabels() {
142 for (var i in texts)
143 {
144 switch(textsInfo[i].getAttribute("labelType")) {
145 case "0": //aka location
146 if ((document.getElementById("labelLocation")).checked == false) {
147 map.removeMyLabel(texts[i]);
148 delete texts[i];
149 delete textsInfo[i];
150 delete hashText[i];
151 }
152 break;
153
154 case "1": //aka zone
155 if ((document.getElementById("labelZone")).checked == false) {
156 map.removeMyLabel(texts[i]);
157 delete texts[i];
158 delete textsInfo[i];
159 delete hashText[i];
160 }
161 break;
162
163 default: alert("bad type in textsInfo in refreshLabels():" + textsInfo[i].getAttribute("labelType"));
164 }//switch
165
166 }
167
168 changeDetail(); // submit request
169
170}
171
172function refreshIcons()
173{
174 for (var i in points)
175 {
176 var name = pointsInfo[i].getAttribute("gatherableName")
177 var element = document.getElementsByName(name);
178 if (element != null && element.length > 0 && (element[0].checked == false) )
179 {
180 //points[i].display(element[0].checked); //set to true/false
181 GEvent.clearListeners(points[i],'click');
182 map.removeOverlay(points[i]);
183 delete points[i];
184 delete pointsInfo[i];
185 delete hashPoints[i];
186 }//if
187 }//for
188
189 changeDetail(); // submit request
190}
191
192
193function changeType(groupCheck, groupVar)
194{
195 for (var i in groupVar)
196 {
197 var element = document.getElementsByName( groupVar[i].toLowerCase() );
198 if (element != null && element.length > 0)
199 //{ element[0].checked = groupCheck.checked; } //expand sets all the sub-checkboxes
200 { element[0].checked = false; } //expand and hide clear all the sub-checkboxes
201 }
202
203 var groupDiv = document.getElementById(groupCheck.name + 'div');
204 if (groupDiv != null)
205 {groupDiv.style.display = (groupCheck.checked?'':'none');} //hidden/visible
206
207 refreshIcons();
208}
209
210function toggleLabel(id) {
211 var ele = document.getElementById(id);
212 ele.checked = !ele.checked;
213 ele.onclick( );
214}
215
216
217function toggleType(name, groupVar)
218{
219 element = document.getElementsByName(name)[0];
220 element.checked = !element.checked;
221 changeType(element, groupVar);
222}
223
224
225function toggleCheckbox(name)
226{
227 element = document.getElementsByName(name)[0];
228 element.checked = !element.checked;
229 refreshIcons(element);
230}
231
232function addCommas(nStr)
233{
234 nStr += '';
235 x = nStr.split('.');
236 x1 = x[0];
237 x2 = x.length > 1 ? '.' + x[1] : '';
238 var rgx = /(\d+)(\d{3})/;
239 while (rgx.test(x1)) {
240 x1 = x1.replace(rgx, '$1' + ',' + '$2');
241 }
242 return x1 + x2;
243}
244
245
246//func is not normally used
247function clearmap() {
248
249 for (var i in points)
250 {
251 GEvent.clearListeners(points[i],'click');
252 map.removeOverlay(points[i]);
253 delete points[i];
254 delete pointsInfo[i];
255 delete hashPoints[i];
256 }
257
258 numPoints=0;
259
260}
261
262
263function zoomTo(pointx,pointy) {
264
265 var zz=5;
266
267 zz=5-parseInt(document.getElementById("detail").value);
268 if (zz<0) zz=0;
269 if (zz>17) zz=17;
270
271 map.centerAndZoom(new GPoint(pointx,pointy), zz);
272}
273
274function ProcessXMLmarker(markers) {
275 switch(markers.getAttribute("type")) {
276 case "resource":
277 createResource(markers);
278 break;
279
280 case "text":
281 //createText(markers);
282 break;
283
284 default: alert("unknown xml marker type returned");
285 }//switch
286
287}
288
289function createText(marker) {
290 var hashKey = marker.getAttribute("lat") + "," + marker.getAttribute("lng") + "," + marker.getAttribute("name");
291
292 //if already displayed, don't send to map
293 if (hashText[hashKey] == true)
294 {
295 //alert("dupe text sent");
296 return;
297 }
298
299 hashText[hashKey] = true; //text displayed
300
301
302 var label = new MyLabel();
303 label.id = hashKey;
304 var point = new GPoint(parseFloat(marker.getAttribute("lat")),
305 parseFloat(marker.getAttribute("lng")));
306 label.anchorLatLng = point;
307 label.content = "<div style=\"background-color: #f2efe9;\"><nobr>" + marker.getAttribute("name") + "</nobr></div>";
308 label.percentOpacity = 70;
309 label.Display(map);
310
311 texts[hashKey]=label; //perhaps consolidate this with hashText instead
312 textsInfo[hashKey]=marker; //perhaps consolidate this with hashText instead
313}
314
315function createResource(markers) {
316
317 hashKey = markers.getAttribute("lat") + "," + markers.getAttribute("lng") + "," + markers.getAttribute("gatherableName");
318
319 //if house sale has already been displayed, don't send to map
320 if (hashPoints[hashKey] == true)
321 {
322 //alert("dupe house sent");
323 return;
324 }
325
326 hashPoints[hashKey] = true; //resource displayed
327
328
329 //var id=markers.getAttribute("id");
330
331 var point = new GPoint(parseFloat(markers.getAttribute("lat")),
332 parseFloat(markers.getAttribute("lng")));
333 var marker;
334 var name = markers.getAttribute("gatherableName");
335 var iconName = markers.getAttribute("icon");
336 marker = createMarker(point, name, iconName);
337
338 map.addOverlay(marker);
339
340
341 var checkbox = document.getElementsByName(name)[0];
342 if ( (checkbox != null) && (checkbox.checked == false))
343 { marker.display(false); } // happens if request returns after user has already unchecked checkbox
344
345 points[hashKey]=marker; //perhaps consolidate this with hashPoints instead
346 pointsInfo[hashKey]=markers; //perhaps consolidate this with hashPoints instead
347 numPoints++;
348
349}
350
351
352
353// Creates a marker whose info window displays the given number
354function createMarker(point, gatherableName, iconName) {
355
356////SCL test code added to change markers..
357// Create our "tiny" marker icon
358var icon = new GIcon();
359icon.image = "http://mapwow.com/icons/large/" + iconName + ".png";
360icon.shadow = "http://mapwow.com/icons/large/shadow.png";
361icon.iconSize = new GSize(32, 32);
362icon.shadowSize = new GSize(32, 32);
363icon.iconAnchor = new GPoint(20, 20);
364icon.infoWindowAnchor = new GPoint(20, 20);
365
366var marker = new GMarker(point,icon);
367
368
369// var marker = new GMarker(point);
370
371 // Show this marker's index in the info window when it is clicked
372 var html = gatherableName;
373 // +"<br/><b>Date Sold: </b>"+date
374 // +"<br/><b>Sale Price: </b>$"+addCommas(price);
375
376// GEvent.addListener(marker, "click", function() {
377// var htmldiv = document.createElement('div');
378// htmldiv.style.width = 290;
379// htmldiv.style.height = 255;
380// htmldiv.innerHTML = html;
381// marker.openInfoWindow(htmldiv);
382// });
383
384 return marker;
385}
386
387
388function mapOne() {
389
390//alert('mapOne');
391
392 ///Convoluted fixup that works
393 if((cmpltdrqst==1) && (newrequest==1)) {
394 i=0;
395 if (lMessage) { lMessage.innerHTML="<p>" + i + " of " + markers.length + "</p>";}
396 document.getElementById('loading').style.visibility='visible';
397 cmpltdrqst=0;
398 newrequest=0;
399 }
400
401
402 if ( i < markers.length ) {
403 var max=Math.min(i+20, markers.length);
404 while (i<max) {
405 ProcessXMLmarker(markers[i]);
406 i++;
407 }
408 if (lMessage) { lMessage.innerHTML="<p>" + i + " of " + markers.length + "</p>";}
409 window.setTimeout(mapOne,timeOut);
410 }
411 if ( i >= markers.length ) {
412 document.getElementById('loading').style.visibility='hidden';
413 cmpltdrqst=1;
414 }
415}
416
417
418
419function startRequest(minx,miny,maxx,maxy,z,clear,minx2,miny2,maxx2,maxy2) {
420 var url;
421 var request;
422
423 lMessage = document.getElementById('lMessage');
424
425//var zz= map.getZoomLevel();
426var zz = z; //workaround? wtf?
427
428 request = GXmlHttp.create();
429
430 if (minx2==null)
431 url="xml.php?minx="+minx+"&miny="+miny+"&maxx="+maxx+"&maxy="+maxy+"&zoom="+zz;
432 else
433 url="xml.php?minx="+minx
434 +"&miny="+miny
435 +"&maxx="+maxx
436 +"&maxy="+maxy
437 +"&minx2="+minx2
438 +"&miny2="+miny2
439 +"&maxx2="+maxx2
440 +"&maxy2="+maxy2
441 +"&zoom="+zz;
442
443 //url+= "&resources=";
444 var urlResources = "";
445 for (var i in herbs)
446 {
447 var element = document.getElementsByName( herbs[i].toLowerCase() );
448 if (element != null && element.length > 0)
449 { if (element[0].checked == true )
450 {urlResources += element[0].name + ','; }
451 }
452 }
453
454 for (var i in ore)
455 {
456 var element = document.getElementsByName( ore[i].toLowerCase() );
457 if (element != null && element.length > 0)
458 { if (element[0].checked == true )
459 {urlResources += element[0].name + ','; }
460 }
461 }
462
463 for (var i in treasure)
464 {
465 var element = document.getElementsByName( treasure[i].toLowerCase() );
466 if (element != null && element.length > 0)
467 { if (element[0].checked == true )
468 {urlResources += element[0].name + ','; }
469 }
470 }
471 if ( urlResources != "" ) //if any resources
472 {
473 url += "&resources=" + urlResources;
474 }
475 else //no resources requested, so do not send request
476 {
477 return;
478 }
479
480// if (document.getElementById('labelLocation').checked == true)
481// {
482// url += "&labelLocation=1";
483// }
484//
485// if (document.getElementById('labelZone').checked == true)
486// {
487// url += "&labelZone=1";
488// }
489
490// var treasure = document.getElementsByName( 'alltreasure' );
491// if (treasure != null && treasure.length > 0)
492// { if (treasure[0].checked == true )
493// { url+= "&resourceType=Treasure"; }
494// }
495
496//document.getElementById("analytics").innerHTML += "<br>" + url;
497
498 request.open("GET", url , true);
499 request.onreadystatechange = function() {
500
501 if (request.readyState == 4) {
502
503 //// if (z!=lastzoom) return;
504
505 var xmlDoc = request.responseXML;
506 markers = xmlDoc.documentElement.getElementsByTagName("marker");
507//alert(markers.length);
508
509 cmpltdrqst=1;
510 newrequest=1;
511 window.setTimeout(mapOne,timeOut);
512
513
514 }
515 }
516
517 request.send(null);
518}
519
520function onLoad() {
521 //if (map) //only execute if there is a map on the page
522 //{
523 //var zoom= map.getZoomLevel();
524 //var bs = map.getBoundsLatLng();
525 //this is in here so that if you hit refresh with checkboxes checked, it will load up the resources/etc checked:
526 //startRequest(bs.minX, bs.minY, bs.maxX, bs.maxY, zoom, 1);
527 //}
528
529 document.getElementById('loading').style.visibility='hidden';
530}
531
532function travelA() {
533 if ((document.getElementById("travelAlliance")).checked == true) {
534 travelLinesA = [
535//KALIMDOR
536//Feathermoon Stronghold - Cenarion Hold
537new GPolyline([new GPoint(-179.717777967453, 85.012882188406), new GPoint(-179.664343810871, 85.0086284108123)], "#0000ff", 5),
538//Feathermoon to Thalanaar
539new GPolyline([new GPoint(-179.717777967453, 85.012882188406), new GPoint(-179.632094181336, 85.0126638252246)], "#0000ff", 5),
540//Feathermoon to Nijel's Point
541new GPolyline([new GPoint(-179.717777967453, 85.012882188406), new GPoint(-179.675822731292, 85.0209437103289)], "#0000ff", 5),
542//Feathermoon to Auberdine
543new GPolyline([new GPoint(-179.717777967453, 85.012882188406), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
544//Cenarion Hold Alliance to Gadgetzan Alliance
545new GPolyline([new GPoint(-179.664343810871, 85.0086284108123), new GPoint(-179.571411168669, 85.0077745025806)], "#0000ff", 5),
546//Cenarion Hold Alliance to Un'Goro Crater (Marshall's Refuge) (approx)
547new GPolyline([new GPoint(-179.664343810871, 85.0086284108123), new GPoint(-179.62099313735962,85.00951875846314)], "#0000ff", 5),
548//Gadgetzan Alliance to Theramore Isle
549new GPolyline([new GPoint(-179.571411168669, 85.0077745025806), new GPoint(-179.555386957937, 85.0138629613415)], "#0000ff", 5),
550//Gadgetzan Alliance to Un'Goro Crater (Marshall's Refuge) (approx)
551new GPolyline([new GPoint(-179.571411168669, 85.0077745025806), new GPoint(-179.62099313735962,85.00951875846314)], "#0000ff", 5),
552//Gadgetzan Alliance to Thalanaar
553new GPolyline([new GPoint(-179.571411168669, 85.0077745025806), new GPoint(-179.632094181336, 85.0126638252246)], "#0000ff", 5),
554//Thalanaar to Theramore Isle
555new GPolyline([new GPoint(-179.632094181336, 85.0126638252246), new GPoint(-179.555386957937, 85.0138629613415)], "#0000ff", 5),
556//Theramore Isle to Nijel's Point
557new GPolyline([new GPoint(-179.555386957937, 85.0138629613415), new GPoint(-179.675822731292, 85.0209437103289)], "#0000ff", 5),
558//Theramore Isle to Auberdine
559new GPolyline([new GPoint(-179.555386957937, 85.0138629613415), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
560//Theramore Isle to Talendris Point
561new GPolyline([new GPoint(-179.555386957937, 85.0138629613415), new GPoint(-179.568446703097, 85.0255645870268)], "#0000ff", 5),
562//Theramore - Ratchet
563new GPolyline([new GPoint(-179.555386957937, 85.0138629613415), new GPoint(-179.56966638565063, 85.01893252838065)], "#0000ff", 5),
564//Ratchet - Talendris Point
565new GPolyline([new GPoint(-179.56966638565063, 85.01893252838065), new GPoint(-179.568446703097, 85.0255645870268)], "#0000ff", 5),
566//Nijel's Point to Auberdine
567new GPolyline([new GPoint(-179.675822731292, 85.0209437103289), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
568//Astranaar to Auberdine
569new GPolyline([new GPoint(-179.64235579293, 85.025738335248), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
570//Stonetalon Peak to Auberdine
571new GPolyline([new GPoint(-179.679227842538, 85.0254838496545), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
572//Stonetalon Peak to Astranaar
573new GPolyline([new GPoint(-179.679227842538, 85.0254838496545), new GPoint(-179.64235579293, 85.025738335248)], "#0000ff", 5),
574//Stonetalon Peak - Nijel's Point
575new GPolyline([new GPoint(-179.679227842538, 85.0254838496545), new GPoint(-179.675822731292, 85.0209437103289)], "#0000ff", 5),
576//Talrendis Point to Auberdine
577new GPolyline([new GPoint(-179.568446703097, 85.0255645870268), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
578//Talrendis Point to Everlook
579new GPolyline([new GPoint(-179.568446703097, 85.0255645870268), new GPoint(-179.550792706994, 85.0328488081527)], "#0000ff", 5),
580//Talrendis Point to Talonbranch Glade
581new GPolyline([new GPoint(-179.568446703097, 85.0255645870268), new GPoint(-179.607987442413, 85.031792940154)], "#0000ff", 5),
582//Moonglade - Talonbranch
583new GPolyline([new GPoint(-179.59684252739, 85.0340268292364), new GPoint(-179.607987442413, 85.031792940154)], "#0000ff", 5),
584//Talonbranch Glade to Auberdine
585new GPolyline([new GPoint(-179.607987442413, 85.031792940154), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
586//Talonbranch Glade to Everlook
587new GPolyline([new GPoint(-179.607987442413, 85.031792940154), new GPoint(-179.550792706994, 85.0328488081527)], "#0000ff", 5),
588//Moonglade to Everlook
589new GPolyline([new GPoint(-179.59684252739, 85.0340268292364), new GPoint(-179.550792706994, 85.0328488081527)], "#0000ff", 5),
590//Moonglade to Auberdine
591new GPolyline([new GPoint(-179.59684252739, 85.0340268292364), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
592//Rut'theran Village to Auberdine BOAT
593new GPolyline([new GPoint(-179.665787814124, 85.0361627050102), new GPoint(-179.659916562627, 85.0320374789963)], "#0000ff", 5),
594//Auberdine to Menethil Harbor BOAT
595new GPolyline([new GPoint(-179.659916562627, 85.0320374789963), new GPoint(-179.061070680618, 85.025359332862)], "#0000ff", 5),
596//Theramore Isle to Menethil Harbor BOAT
597new GPolyline([new GPoint(-179.555386957937, 85.0138629613415), new GPoint(-179.061070680618, 85.025359332862)], "#0000ff", 5),
598//Ratchet to Booty Bay BOAT
599new GPolyline([new GPoint(-179.56966638565063, 85.01893252838065), new GPoint(-179.08884286880493, 85.00660320081198)], "#0000ff", 5),
600//Feralas to feathermoon BOAT
601new GPolyline([new GPoint(-179.69839096069336, 85.012894313187), new GPoint(-179.71529960632324, 85.01314799417)], "#0000ff", 5),
602//Rut'theran Village to Nighthaven Druid Alliance
603new GPolyline([new GPoint(-179.665787814124, 85.0361627050102), new GPoint(-179.598788880125, 85.0346150254243)], "#00ff00", 5),
604
605//EASTERN KINGDOM
606//Ironforge to Light's Hope Chapel
607new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-178.966992550451, 85.036161129511)], "#0000ff", 5),
608//Ironforge to Chillwind Point
609new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-179.047517784958, 85.0337914636617)], "#0000ff", 5),
610//Ironforge to Aerie Peak
611new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-179.035938195199, 85.0326322311341)], "#0000ff", 5),
612//Ironforge to Southshore
613new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-179.066570717459, 85.0308487561961)], "#0000ff", 5),
614//Ironforge to Refuge Point
615new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-179.025401600231, 85.0299075925058)], "#0000ff", 5),
616//Ironforge to Menethil Harbor
617new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-179.061070680618, 85.025359332862)], "#0000ff", 5),
618//Ironforge to Thelsamar
619new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-179.016961726625, 85.0224078398056)], "#0000ff", 5),
620//Ironforge to Thorium Point
621new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-179.053058736708, 85.0204133361395)], "#0000ff", 5),
622//Ironforge to Stormwind
623new GPolyline([new GPoint(-179.05812078281, 85.0232666167634), new GPoint(-179.087079818251, 85.0163272218464)], "#0000ff", 5),
624//Chillwind Point to Light Hope Chapel
625new GPolyline([new GPoint(-179.047517784958, 85.0337914636617), new GPoint(-178.966992550451, 85.036161129511)], "#0000ff", 5),
626//Chillwind Point to Southshore
627new GPolyline([new GPoint(-179.047517784958, 85.0337914636617), new GPoint(-179.066570717459, 85.0308487561961)], "#0000ff", 5),
628//Aerie Peak to Light's Hope Chapel
629new GPolyline([new GPoint(-179.035938195199, 85.0326322311341), new GPoint(-178.966992550451, 85.036161129511)], "#0000ff", 5),
630//Aerie Peak - Chillwind Point
631new GPolyline([new GPoint(-179.035938195199, 85.0326322311341), new GPoint(-179.047517784958, 85.0337914636617)], "#0000ff", 5),
632//Aerie Peak to Refuge Point
633new GPolyline([new GPoint(-179.035938195199, 85.0326322311341), new GPoint(-179.025401600231, 85.0299075925058)], "#0000ff", 5),
634//Aerie Peak to Southshore
635new GPolyline([new GPoint(-179.035938195199, 85.0326322311341), new GPoint(-179.066570717459, 85.0308487561961)], "#0000ff", 5),
636//Southshore to Refuge Point
637new GPolyline([new GPoint(-179.066570717459, 85.0308487561961), new GPoint(-179.025401600231, 85.0299075925058)], "#0000ff", 5),
638//Southshore to Menethil Harbor
639new GPolyline([new GPoint(-179.066570717459, 85.0308487561961), new GPoint(-179.061070680618, 85.025359332862)], "#0000ff", 5),
640//Refuge Point to Thelsamar
641new GPolyline([new GPoint(-179.025401600231, 85.0299075925058), new GPoint(-179.016961726625, 85.0224078398056)], "#0000ff", 5),
642//Refuge Point to Menethil Harbor
643new GPolyline([new GPoint(-179.025401600231, 85.0299075925058), new GPoint(-179.061070680618, 85.025359332862)], "#0000ff", 5),
644//Thelsamar to Menethil Harbor
645new GPolyline([new GPoint(-179.016961726625, 85.0224078398056), new GPoint(-179.061070680618, 85.025359332862)], "#0000ff", 5),
646//Thorium Point to Morgan's Vigil
647new GPolyline([new GPoint(-179.053058736708, 85.0204133361395), new GPoint(-179.020855350267, 85.0171686603534)], "#0000ff", 5),
648//Stormwind to Lakeshire
649new GPolyline([new GPoint(-179.087079818251, 85.0163272218464), new GPoint(-179.031072674803, 85.0153067551078)], "#0000ff", 5),
650//Stormwind to Darkshire
651new GPolyline([new GPoint(-179.087079818251, 85.0163272218464), new GPoint(-179.051373847373, 85.0133316262877)], "#0000ff", 5),
652//Stormwind to Sentinel Hill
653new GPolyline([new GPoint(-179.087079818251, 85.0163272218464), new GPoint(-179.098366967027, 85.0131278703997)], "#0000ff", 5),
654//Stormwind to Netherguard Keep
655new GPolyline([new GPoint(-179.087079818251, 85.0163272218464), new GPoint(-179.00644927816, 85.0122607151302)], "#0000ff", 5),
656//Stormwind to Booty Bay
657new GPolyline([new GPoint(-179.087079818251, 85.0163272218464), new GPoint(-179.086928902606, 85.006238221709)], "#0000ff", 5),
658//Morgan's Vigil to Netherguard Keep
659new GPolyline([new GPoint(-179.020855350267, 85.0171686603534), new GPoint(-179.00644927816, 85.0122607151302)], "#0000ff", 5),
660//Morgan's Vigil - Lakeshire
661new GPolyline([new GPoint(-179.020855350267, 85.0171686603534), new GPoint(-179.031072674803, 85.0153067551078)], "#0000ff", 5),
662//Lakeshire to Sentinel Hill
663new GPolyline([new GPoint(-179.031072674803, 85.0153067551078), new GPoint(-179.098366967027, 85.0131278703997)], "#0000ff", 5),
664//Lakeshire to Darkshire
665new GPolyline([new GPoint(-179.031072674803, 85.0153067551078), new GPoint(-179.051373847373, 85.0133316262877)], "#0000ff", 5),
666//Darkshire to Sentinel Hill
667new GPolyline([new GPoint(-179.051373847373, 85.0133316262877), new GPoint(-179.098366967027, 85.0131278703997)], "#0000ff", 5),
668//Darkshire to Netherguard Keep
669new GPolyline([new GPoint(-179.051373847373, 85.0133316262877), new GPoint(-179.00644927816, 85.0122607151302)], "#0000ff", 5),
670//Darkshire to Booty Bay
671new GPolyline([new GPoint(-179.051373847373, 85.0133316262877), new GPoint(-179.086928902606, 85.006238221709)], "#0000ff", 5),
672//Sentinel Hill to Booty Bay
673new GPolyline([new GPoint(-179.098366967027, 85.0131278703997), new GPoint(-179.086928902606, 85.006238221709)], "#0000ff", 5) //NOTE NO COMMA HERE
674
675//test1
676//new GPolyline([new GPoint(), new GPoint()], "#0000ff", 5),
677//test2 final line
678//new GPolyline([new GPoint(-179.557456970215, 85.0239101012008), new GPoint(-179.576683044434, 85.0064733942707)], "#0000ff", 5)
679 ];
680 for (var i in travelLinesA)
681 {
682 map.addOverlay(travelLinesA[i]);
683 }
684
685 } else { //checkbox turned off
686 for (var i in travelLinesA)
687 {
688 map.removeOverlay(travelLinesA[i]);
689 travelLinesA[i] = null;
690 }
691 }
692}
693
694function travelH() {
695 if ((document.getElementById("travelHorde")).checked == true) {
696 travelLinesH = [
697
698//KALIMDOR
699//Orgrimmar to Everlook
700new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.553414448152, 85.032876379849)], "#ff0000", 5),
701//Orgrimmar to Bloodvenom Post
702new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.64137456824, 85.0297420480264)], "#ff0000", 5),
703//Orgrimmar to Valormok
704new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.557672681617, 85.027157463254)], "#ff0000", 5),
705//Splintertree - Valormok
706new GPolyline([new GPoint(-179.596854599874, 85.0248167774746), new GPoint(-179.557672681617, 85.027157463254)], "#ff0000", 5),
707//Orgrimmar to Splintertree Post
708new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.596854599874, 85.0248167774746)], "#ff0000", 5),
709//Orgrimmar to Thunder Bluff
710new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.649060045838, 85.0185584095893)], "#ff0000", 5),
711//Orgrimmar to Crossroads
712new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.594648018034, 85.0198988942759)], "#ff0000", 5),
713//Orgrimmar to Brackenwall Village
714new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.589671471758, 85.0150861790666)], "#ff0000", 5),
715//Orgrimmar to Gadgetzan
716new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.570130143954, 85.008079478116)], "#ff0000", 5),
717//Everlook to Shrine of Remulos
718new GPolyline([new GPoint(-179.553414448152, 85.032876379849), new GPoint(-179.604730554446, 85.0341153029707)], "#ff0000", 5),
719//Everlook to Bloodvenom Post
720new GPolyline([new GPoint(-179.553414448152, 85.032876379849), new GPoint(-179.64137456824, 85.0297420480264)], "#ff0000", 5),
721//Bloodvenom Post to Shrine of Remulos
722new GPolyline([new GPoint(-179.64137456824, 85.0297420480264), new GPoint(-179.604730554446, 85.0341153029707)], "#ff0000", 5),
723//Bloodvenom Post to Valormok
724new GPolyline([new GPoint(-179.64137456824, 85.0297420480264), new GPoint(-179.557672681617, 85.027157463254)], "#ff0000", 5),
725//Bloodvenom Post to Crossroads
726new GPolyline([new GPoint(-179.64137456824, 85.0297420480264), new GPoint(-179.594648018034, 85.0198988942759)], "#ff0000", 5),
727//Valormok to Crossroads
728new GPolyline([new GPoint(-179.557672681617, 85.027157463254), new GPoint(-179.594648018034, 85.0198988942759)], "#ff0000", 5),
729//Valormok to Thunder Bluff
730new GPolyline([new GPoint(-179.557672681617, 85.027157463254), new GPoint(-179.649060045838, 85.0185584095893)], "#ff0000", 5),
731//Splintertree Post to Zoram'gar Outpost
732new GPolyline([new GPoint(-179.596854599874, 85.0248167774746), new GPoint(-179.669103052432, 85.0267185265023)], "#ff0000", 5),
733//Splintertree Post to Crossroads
734new GPolyline([new GPoint(-179.596854599874, 85.0248167774746), new GPoint(-179.594648018034, 85.0198988942759)], "#ff0000", 5),
735//Thunder Bluff to Sunrock Retreat
736new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.669948126328, 85.0224357230089)], "#ff0000", 5),
737//Thunder Bluff to Crossroads
738new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.594648018034, 85.0198988942759)], "#ff0000", 5),
739//Ratchet - Crossroads
740new GPolyline([new GPoint(-179.56966638565063, 85.01893252838065), new GPoint(-179.594648018034, 85.0198988942759)], "#ff0000", 5),
741//Thunder Bluff to Camp Taurajo
742new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.609764780369, 85.0164606921126)], "#ff0000", 5),
743//Thunder Bluff to Brackenwall Village
744new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.589671471758, 85.0150861790666)], "#ff0000", 5),
745//Thunder Bluff to Shadowprey Village
746new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.715613639308, 85.017534010552)], "#ff0000", 5),
747//Thunder Bluff to Camp Mojache
748new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.653231089139, 85.0128430412506)], "#ff0000", 5),
749//Thunder Bluff to Freewind Post
750new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.598499811197, 85.011046343876)], "#ff0000", 5),
751//Thunder Bluff to Gadgetzan
752new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.570130143954, 85.008079478116)], "#ff0000", 5),
753//Crossroards to Zoram'gar Outpost
754new GPolyline([new GPoint(-179.594648018034, 85.0198988942759), new GPoint(-179.669103052432, 85.0267185265023)], "#ff0000", 5),
755//Crossroards to Sunrock Retreat
756new GPolyline([new GPoint(-179.594648018034, 85.0198988942759), new GPoint(-179.669948126328, 85.0224357230089)], "#ff0000", 5),
757//Crossroards to Brackenwall Village
758new GPolyline([new GPoint(-179.594648018034, 85.0198988942759), new GPoint(-179.589671471758, 85.0150861790666)], "#ff0000", 5),
759//Crossroards to Gadgetzan
760new GPolyline([new GPoint(-179.594648018034, 85.0198988942759), new GPoint(-179.570130143954, 85.008079478116)], "#ff0000", 5),
761//Crossroards to Camp Mojache
762new GPolyline([new GPoint(-179.594648018034, 85.0198988942759), new GPoint(-179.653231089139, 85.0128430412506)], "#ff0000", 5),
763//Crossroards to Camp Taurajo
764new GPolyline([new GPoint(-179.594648018034, 85.0198988942759), new GPoint(-179.609764780369, 85.0164606921126)], "#ff0000", 5),
765//Crossroards to Freewind Post
766new GPolyline([new GPoint(-179.594648018034, 85.0198988942759), new GPoint(-179.598499811197, 85.011046343876)], "#ff0000", 5),
767//Crossroards to Gadgetzan
768new GPolyline([new GPoint(-179.594648018034, 85.0198988942759), new GPoint(-179.570130143954, 85.008079478116)], "#ff0000", 5),
769//Gadgetzan to Brackenwall Village
770new GPolyline([new GPoint(-179.570130143954, 85.008079478116), new GPoint(-179.589671471758, 85.0150861790666)], "#ff0000", 5),
771//Gadgetzan to Camp Mojache
772new GPolyline([new GPoint(-179.570130143954, 85.008079478116), new GPoint(-179.653231089139, 85.0128430412506)], "#ff0000", 5),
773//Gadgetzan to Un'Goro Crater (Marshall's Refuge) (approx)
774new GPolyline([new GPoint(-179.570130143954, 85.008079478116), new GPoint(-179.62099313735962,85.00951875846314)], "#ff0000", 5),
775//Cenarion Hold - Camp Mojache
776new GPolyline([new GPoint(-179.665825372964, 85.0085380175295), new GPoint(-179.653231089139, 85.0128430412506)], "#ff0000", 5),
777//Cenarion Hold - Un'Goro Crater (Marshall's Refuge) (approx)
778new GPolyline([new GPoint(-179.665825372964, 85.0085380175295), new GPoint(-179.62099313735962,85.00951875846314)], "#ff0000", 5),
779//Freewind Post - Camp Mojache
780new GPolyline([new GPoint(-179.598499811197, 85.011046343876), new GPoint(-179.653231089139, 85.0128430412506)], "#ff0000", 5),
781//Gadgetzan to Freewind Post
782new GPolyline([new GPoint(-179.570130143954, 85.008079478116), new GPoint(-179.598499811197, 85.011046343876)], "#ff0000", 5),
783//Gadgetzan to Cenarion Hold
784new GPolyline([new GPoint(-179.570130143954, 85.008079478116), new GPoint(-179.665825372964, 85.0085380175295)], "#ff0000", 5),
785//Sunrock Retreat to Shadowprey Village
786new GPolyline([new GPoint(-179.669948126328, 85.0224357230089), new GPoint(-179.715613639308, 85.017534010552)], "#ff0000", 5),
787//Shadowprey Vilalge to Camp Mojache
788new GPolyline([new GPoint(-179.715613639308, 85.017534010552), new GPoint(-179.653231089139, 85.0128430412506)], "#ff0000", 5),
789//Freewind Post to Camp Taurajo
790new GPolyline([new GPoint(-179.598499811197, 85.011046343876), new GPoint(-179.609764780369, 85.0164606921126)], "#ff0000", 5),
791
792//Ratchet to Booty Bay BOAT
793new GPolyline([new GPoint(-179.56966638565063, 85.01893252838065), new GPoint(-179.08884286880493, 85.00660320081198)], "#ff0000", 5),
794//Feralas to feathermoon BOAT
795new GPolyline([new GPoint(-179.69839096069336, 85.012894313187), new GPoint(-179.71529960632324, 85.01314799417)], "#ff0000", 5),
796//Orgrimmar to Undercity BOAT (zepp)
797new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.082357164666, 85.0349516852955)], "#ff0000", 5),
798//Orgrimmar to Grom'Gol Base Camp BOAT (zepp)
799new GPolyline([new GPoint(-179.559455385122, 85.0236971571991), new GPoint(-179.079958612014, 85.0099041985758)], "#ff0000", 5),
800//Undercity to Grom'Gol BOAT (zepp)
801new GPolyline([new GPoint(-179.082357164666, 85.0349516852955), new GPoint(-179.079958612014, 85.0099041985758)], "#ff0000", 5),
802
803//Druid flight path (thunderbluff <- moonglade)
804new GPolyline([new GPoint(-179.649060045838, 85.0185584095893), new GPoint(-179.598600415232, 85.0346117680087)], "#00ff00", 5),
805
806//EASTERN KINGDOM
807//Undercity to Lights Hope Chapel
808new GPolyline([new GPoint(-179.082357164666, 85.0349516852955), new GPoint(-178.967885971069, 85.0362617856178)], "#ff0000", 5),
809//Tarren Mill to The Sepulcher
810new GPolyline([new GPoint(-179.059223473123, 85.0321278451283), new GPoint(-179.108643987085, 85.032978709236)], "#ff0000", 5),
811//Undercity to Tarren Mill
812new GPolyline([new GPoint(-179.082357164666, 85.0349516852955), new GPoint(-179.059223473123, 85.0321278451283)], "#ff0000", 5),
813//Undercity to Hammerfall
814new GPolyline([new GPoint(-179.082357164666, 85.0349516852955), new GPoint(-179.005210428398, 85.0304868014905)], "#ff0000", 5),
815//Undercity to Revantusk Village
816new GPolyline([new GPoint(-179.082357164666, 85.0349516852955), new GPoint(-178.981820515627, 85.0312432350425)], "#ff0000", 5),
817//Light's Hope Chapel - Revantusk Village
818new GPolyline([new GPoint(-178.967885971069, 85.0362617856178), new GPoint(-178.981820515627, 85.0312432350425)], "#ff0000", 5),
819//Hammerfall - Revantusk Village
820new GPolyline([new GPoint(-179.005210428398, 85.0304868014905), new GPoint(-178.981820515627, 85.0312432350425)], "#ff0000", 5),
821//Undercity to Kargath
822new GPolyline([new GPoint(-179.082357164666, 85.0349516852955), new GPoint(-179.032082803521, 85.0202615956039)], "#ff0000", 5),
823//Tarren Mill to Revanstusk Village
824new GPolyline([new GPoint(-179.059223473123, 85.0321278451283), new GPoint(-178.981820515627, 85.0312432350425)], "#ff0000", 5),
825//Tarren Mill to Hammerfall
826new GPolyline([new GPoint(-179.059223473123, 85.0321278451283), new GPoint(-179.005210428398, 85.0304868014905)], "#ff0000", 5),
827//Hammerfall to Kargath
828new GPolyline([new GPoint(-179.005210428398, 85.0304868014905), new GPoint(-179.032082803521, 85.0202615956039)], "#ff0000", 5),
829//Kargath to Thorium Point
830new GPolyline([new GPoint(-179.032082803521, 85.0202615956039), new GPoint(-179.054490087759, 85.0204121724851)], "#ff0000", 5),
831//Kargath to Ruins of Thaurissan
832new GPolyline([new GPoint(-179.032082803521, 85.0202615956039), new GPoint(-179.031793716218, 85.0187418629388)], "#ff0000", 5),
833//Kargath to Stonard
834new GPolyline([new GPoint(-179.032082803521, 85.0202615956039), new GPoint(-179.009438078668, 85.0133893435466)], "#ff0000", 5),
835//Kargath to Grom'Gol
836new GPolyline([new GPoint(-179.032082803521, 85.0202615956039), new GPoint(-179.079958612014, 85.0099041985758)], "#ff0000", 5),
837//Kargath to Booty Bay
838new GPolyline([new GPoint(-179.032082803521, 85.0202615956039), new GPoint(-179.087694883347, 85.0063090300801)], "#ff0000", 5),
839//Thorium Point to Ruins of Thaurissan
840new GPolyline([new GPoint(-179.054490087759, 85.0204121724851), new GPoint(-179.031793716218, 85.0187418629388)], "#ff0000", 5),
841//Ruins of Thaurissan to Stonard
842new GPolyline([new GPoint(-179.031793716218, 85.0187418629388), new GPoint(-179.009438078668, 85.0133893435466)], "#ff0000", 5),
843//Stonard to Grom'Gol
844new GPolyline([new GPoint(-179.009438078668, 85.0133893435466), new GPoint(-179.079958612014, 85.0099041985758)], "#ff0000", 5),
845//Stonard to Booty Bay
846new GPolyline([new GPoint(-179.009438078668, 85.0133893435466), new GPoint(-179.087694883347, 85.0063090300801)], "#ff0000", 5),
847//Grom'Gol to Booty Bay
848new GPolyline([new GPoint(-179.079958612014, 85.0099041985758), new GPoint(-179.087694883347, 85.0063090300801)], "#ff0000", 5) //NOTE NO COMMA HERE
849
850 ];
851
852 for (var i in travelLinesH)
853 {
854 map.addOverlay(travelLinesH[i]);
855 }
856
857 } else { //checkbox turned off
858 for (var i in travelLinesH)
859 {
860 map.removeOverlay(travelLinesH[i]);
861 travelLinesH[i] = null;
862 }
863 }
864}
865
866function update_m() {
867alert("herhe");
868 var zoom= map.getZoomLevel();
869 var bounds = map.getBoundsLatLng();
870 startRequest(bounds.minX, bounds.minY, bounds.maxX, bounds.maxY, zoom, 1);
871}
872
873function changeDetail() {
874 var zoom= map.getZoomLevel();
875 var bounds = map.getBoundsLatLng();
876 startRequest(bounds.minX, bounds.minY, bounds.maxX, bounds.maxY, zoom, 1);
877}
878
879function nameLocs() {
880 if ((document.getElementById("labelLocation")).checked == true) {
881 nameTextLocs = [
882new MyLabel("Darnassus",new GPoint(-179.699592590332,85.0384066596173)),
883new MyLabel("Gadgetzan",new GPoint(-179.570760726929,85.0079300228176)),
884new MyLabel("Everlook",new GPoint(-179.553165435791,85.0327765988533)),
885new MyLabel("Orgrimmar",new GPoint(-179.557456970215,85.0239101012008)),
886new MyLabel("Thunderbluff",new GPoint(-179.648952484131,85.0186064759602)),
887new MyLabel("Undercity",new GPoint(-179.081954956055,85.0349610460778)),
888new MyLabel("Ironforge",new GPoint(-179.060153961182,85.0232921316594)),
889new MyLabel("Stormwind",new GPoint(-179.091825485229,85.016571427908)),
890new MyLabel("Booty Bay",new GPoint(-179.086761474609,85.0063912128499)),
891new MyLabel("Shadowprey Village",new GPoint(-179.715613639308,85.017534010552)),
892new MyLabel("Feathermoon",new GPoint(-179.717777967453,85.012882188406)),
893new MyLabel("Stonetalon Peak",new GPoint(-179.679227842538,85.0254838496545)),
894new MyLabel("Nijel's Point",new GPoint(-179.675822731292,85.0209437103289)),
895new MyLabel("Rut'theran Village",new GPoint(-179.665787814124,85.0361627050102)),
896new MyLabel("Auberdine",new GPoint(-179.659916562627,85.0320374789963)),
897new MyLabel("Bloodvenom Post",new GPoint(-179.64137456824,85.0297420480264)),
898new MyLabel("Zoram'gar Outpost",new GPoint(-179.669103052432,85.0267185265023)),
899new MyLabel("Astranaar",new GPoint(-179.64235579293,85.025738335248)),
900new MyLabel("Sunrock Retreat",new GPoint(-179.669948126328,85.0224357230089)),
901new MyLabel("Mojache",new GPoint(-179.653231089139,85.0128430412506)),
902new MyLabel("Thalanaar",new GPoint(-179.632094181336,85.0126638252246)),
903new MyLabel("Cenarion Hold",new GPoint(-179.664343810871,85.0086284108123)),
904new MyLabel("Nighthaven",new GPoint(-179.598600415232,85.0346117680087)),
905new MyLabel("Talonbranch Glade",new GPoint(-179.607987442413,85.031792940154)),
906new MyLabel("Splintertree Post",new GPoint(-179.596854599874,85.0248167774746)),
907new MyLabel("Crossroads",new GPoint(-179.594648018034,85.0198988942759)),
908new MyLabel("Camp Taurajo",new GPoint(-179.609764780369,85.0164606921126)),
909new MyLabel("Brackenwall Village",new GPoint(-179.589671471758,85.0150861790666)),
910new MyLabel("Freewind Post",new GPoint(-179.598499811197,85.011046343876)),
911new MyLabel("Valormok",new GPoint(-179.557672681617,85.027157463254)),
912new MyLabel("Talrendis Point",new GPoint(-179.568446703097,85.0255645870268)),
913new MyLabel("Theramore Isle",new GPoint(-179.555386957937,85.0138629613415)),
914new MyLabel("The Sepulcher",new GPoint(-179.108643987085,85.032978709236)),
915new MyLabel("Southshore",new GPoint(-179.066570717459,85.0308487561961)),
916new MyLabel("Tarren Mill",new GPoint(-179.059223473123,85.0321278451283)),
917new MyLabel("Menethil Harbor",new GPoint(-179.061070680618,85.025359332862)),
918new MyLabel("Sentinel Hill",new GPoint(-179.098366967027,85.0131278703997)),
919new MyLabel("Grom'Gol",new GPoint(-179.079958612014,85.0099041985758)),
920new MyLabel("Chillwind Point",new GPoint(-179.047517784958,85.0337914636617)),
921new MyLabel("Aerie Peak",new GPoint(-179.035938195199,85.0326322311341)),
922new MyLabel("Refuge Pointe",new GPoint(-179.025401600231,85.0299075925058)),
923new MyLabel("Thelsamar",new GPoint(-179.016961726625,85.0224078398056)),
924new MyLabel("Kargath",new GPoint(-179.032082803521,85.0202615956039)),
925new MyLabel("Flame Crest",new GPoint(-179.031793716218,85.0187418629388)),
926new MyLabel("Thorium Point",new GPoint(-179.053058736708,85.0204133361395)),
927new MyLabel("Lakeshire",new GPoint(-179.031072674803,85.0153067551078)),
928new MyLabel("Morgan's Vigil",new GPoint(-179.020855350267,85.0171686603534)),
929new MyLabel("Darkshire",new GPoint(-179.051373847373,85.0133316262877)),
930new MyLabel("HammerFall",new GPoint(-179.005210428398,85.0304868014905)),
931new MyLabel("Revantusk Village",new GPoint(-178.981820515627,85.0312432350425)),
932new MyLabel("Stonard",new GPoint(-179.009438078668,85.0133893435466)),
933new MyLabel("Nethergarde Keep",new GPoint(-179.00644927816,85.0122607151302)),
934new MyLabel("Ratchet",new GPoint(-179.5709216594696,85.01899680477433)),
935new MyLabel("Marshall's Refuge",new GPoint(-179.62099313735962,85.00951875846314)),
936new MyLabel("Light's Hope Chapel",new GPoint(-178.966992550451,85.036161129511)) //NOTE NO COMMA HERE on last one
937 ];
938
939 for (var i in nameTextLocs)
940 {
941 nameTextLocs[i].Display(map);
942 }
943
944 } else { //checkbox turned off
945 for (var i in nameTextLocs)
946 {
947 map.removeMyLabel(nameTextLocs[i]);
948 delete nameTextLocs[i];
949 nameTextLocs[i] = null; //do we need both of these?
950 }
951 }
952}//nameLocs()
953
954function nameZones() {
955 if ((document.getElementById("labelZone")).checked == true) {
956 nameTextZones = [
957new MyLabel("The Shimmering Flats",new GPoint(-179.5563,85.01039)),
958new MyLabel("Thousand Needles",new GPoint(-179.611444473267,85.011610788579)),
959new MyLabel("Teldrassil",new GPoint(-179.676933288574,85.0393864414)),
960new MyLabel("Moonglade",new GPoint(-179.596252441406,85.0352284635505)),
961new MyLabel("Winterspring",new GPoint(-179.557113647461,85.033712907885)),
962new MyLabel("Darkshore",new GPoint(-179.653587341309,85.0335048544266)),
963new MyLabel("Felwood",new GPoint(-179.621658325195,85.031899578347)),
964new MyLabel("Hyjal",new GPoint(-179.592132568359,85.0296989149504)),
965new MyLabel("Azshara",new GPoint(-179.53857421875,85.0270508831171)),
966new MyLabel("Ashenvale Forest",new GPoint(-179.615821838379,85.0253244421305)),
967new MyLabel("Stonetalon Mountains",new GPoint(-179.661483764648,85.0229123774657)),
968new MyLabel("The Barrens",new GPoint(-179.59831237793,85.0206481448967)),
969new MyLabel("Desolace",new GPoint(-179.683456420898,85.0190387237158)),
970new MyLabel("Mulgore",new GPoint(-179.639854431152,85.0171902298714)),
971new MyLabel("Dustwallow Marsh",new GPoint(-179.579772949219,85.0143863694427)),
972new MyLabel("Feralas",new GPoint(-179.677276611328,85.0119391634444)),
973new MyLabel("Silithus",new GPoint(-179.672470092773,85.0068917514973)),
974new MyLabel("Un'Goro Crater",new GPoint(-179.620971679688,85.0078777409225)),
975new MyLabel("Tanaris",new GPoint(-179.576683044434,85.0064733942707)),
976new MyLabel("Durotar",new GPoint(-179.555053710938,85.0216612180296)),
977new MyLabel("Tirisfal Glades",new GPoint(-179.084014892578,85.0366247436159)),
978new MyLabel("Western Plaguelands",new GPoint(-179.041442871094,85.0356741274118)),
979new MyLabel("Eastern Plaguelands",new GPoint(-178.984794616699,85.0366247436159)),
980new MyLabel("Alterac Mountains",new GPoint(-179.069595336914,85.0331481711277)),
981new MyLabel("Silverpine Forest",new GPoint(-179.102897644043,85.0322266210006)),
982new MyLabel("The Hinterlands",new GPoint(-179.008140563965,85.0323158107245)),
983new MyLabel("Hillsbrad Foothills",new GPoint(-179.062728881836,85.0312751645526)),
984new MyLabel("Arathi Highlands",new GPoint(-179.019470214844,85.0294609471598)),
985new MyLabel("Wetlands",new GPoint(-179.025650024414,85.0265151550541)),
986new MyLabel("Loch Modan",new GPoint(-179.006767272949,85.0227038726764)),
987new MyLabel("Dun Morogh",new GPoint(-179.066848754883,85.0221378871845)),
988new MyLabel("Searing Gorge",new GPoint(-179.048309326172,85.0197540860683)),
989new MyLabel("Badlands",new GPoint(-179.00951385498,85.0198136949716)),
990new MyLabel("Burning Steppes",new GPoint(-179.038696289062,85.0177865929601)),
991new MyLabel("Redridge Mountains",new GPoint(-179.021873474121,85.0154305438778)),
992new MyLabel("Elwynn Forest",new GPoint(-179.067535400391,85.0154603742276)),
993new MyLabel("Duskwood",new GPoint(-179.064788818359,85.013341976825)),
994new MyLabel("Westfall",new GPoint(-179.10701751709,85.0131629161799)),
995new MyLabel("Swamp of Sorrows",new GPoint(-179.002990722656,85.0139387993254)),
996new MyLabel("Deadwind Pass",new GPoint(-179.036979675293,85.0129241586766)),
997new MyLabel("Blasted Lands",new GPoint(-179.012603759766,85.0117899048149)),
998new MyLabel("Stranglethorn Vale",new GPoint(-179.07096862793,85.0097296807265)) //NOTE NO COMMA HERE on last one
999 ];
1000
1001 for (var i in nameTextZones)
1002 {
1003 nameTextZones[i].Display(map);
1004 }
1005
1006 } else { //checkbox turned off
1007 for (var i in nameTextZones)
1008 {
1009 map.removeMyLabel(nameTextZones[i]);
1010 delete nameTextZones[i];
1011 nameTextZones[i] = null; //do we need both of these?
1012 }
1013 }
1014}//nameZones()
Note: See TracBrowser for help on using the repository browser.