forked from ProjectionWizard/projectionwizard.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputFormat.js
1465 lines (1267 loc) · 56.4 KB
/
outputFormat.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* PROJECTION WIZARD v2.0
* Map Projection Selection Tool
*
* Author: Bojan Savric, Jacob Wasilkowski
* Date: May, 2020
*
*/
/***MAIN OUTPUT FUNCTION***/
function makeOutput(currentlyDragging) {
currentlyDragging = currentlyDragging || false;
//computing a scale of the map
var scale = 720. / (lonmax - lonmin) / (Math.sin(latmax * Math.PI / 180.) - Math.sin(latmin * Math.PI / 180.));
//reading the passed distortion
var distortion = $('input[name=distortion]:checked').val();
//getting a center of the map
var center = rectangle.getBounds().getCenter();
// rounding central meridian
if (document.getElementById("roundCM").checked)
{
center.lng = Math.round(center.lng);
}
//var printoutTEXT = $("#printout").empty();
//printoutTEXT.append("<p>Ratio/scale: " + scale + ", center latitude: " + center.lat + ", center longitude: " + center.lng + "</p>");
if (scale < 1.5) {
//locking Conformal map
var radioConformal = document.getElementById("Conformal");
if (radioConformal.checked) {
document.getElementById("Equalarea").checked = true;
distortion = "Equalarea";
}
radioConformal.disabled = true;
document.getElementById("Label2").style.color = "#BDBDBD";
//unlocking compromise
var radioCompromise = document.getElementById("Compromise");
if (radioCompromise.disabled) {
radioCompromise.disabled = false;
document.getElementById("Label4").style.color = "#000000";
}
//World (small-scale) map
printWorld(distortion, center, scale, currentlyDragging);
} else if (scale < 6) {
//Case: geographic extent is in the tropics
if ((Math.abs(latmax) < 23.43665) && (Math.abs(latmin) < 23.43665)) {
//unlocking conformal
var radioConformal = document.getElementById("Conformal");
if (radioConformal.disabled) {
radioConformal.disabled = false;
document.getElementById("Label2").style.color = "#000000";
}
}
//Case: geographic extent is out of the tropics
else {
//locking conformal map
var radioConformal = document.getElementById("Conformal");
if (radioConformal.checked) {
document.getElementById("Equalarea").checked = true;
distortion = "Equalarea";
}
radioConformal.disabled = true;
document.getElementById("Label2").style.color = "#BDBDBD";
}
//locking compromise map
var radioCompromise = document.getElementById("Compromise");
if (radioCompromise.checked) {
document.getElementById("Equalarea").checked = true;
distortion = "Equalarea";
}
radioCompromise.disabled = true;
document.getElementById("Label4").style.color = "#BDBDBD";
//Hemisphere (medium-scale) map
printHemisphere(distortion, center, scale);
addMapPreview(center, currentlyDragging);
} else {
//locking compromise map
var radioCompromise = document.getElementById("Compromise");
if (radioCompromise.checked) {
document.getElementById("Equalarea").checked = true;
distortion = "Equalarea";
}
radioCompromise.disabled = true;
document.getElementById("Label4").style.color = "#BDBDBD";
//unlocking conformal
var radioConformal = document.getElementById("Conformal");
if (radioConformal.disabled) {
radioConformal.disabled = false;
document.getElementById("Label2").style.color = "#000000";
}
//Continent or a smaller area (large-scale) map
printSmallerArea(distortion, center, scale);
addMapPreview(center, currentlyDragging);
}
highlightActiveProjectionNode();
}
/***PRINTING WOLRD MAP PROJECTIONS***/
/*Global list of world map projections*/
var listWorld = [
//Equal-area world map projections with poles represented as points
{
projection : "Mollweide",
PROJ4 : "moll"
}, {
projection : "Hammer (or Hammer-Aitoff)",
PROJ4 : "hammer"
},
//Equal-area world map projections with poles represented as lines
{
projection : "Equal Earth",
PROJ4 : "eqearth"
}, {
projection : "Eckert IV",
PROJ4 : "eck4"
}, {
projection : "Wagner IV (or Putnins P2`)",
PROJ4 : "wag4"
}, {
projection : "Wagner VII (or Hammer-Wagner)",
PROJ4 : "wag7"
},
//Compromise world map projections
{
projection : "Robinson",
PROJ4 : "robin"
}, {
projection : "Natural Earth",
PROJ4 : "natearth"
}, {
projection : "Winkel Tripel",
PROJ4 : "wintri"
}, {
projection : "Patterson",
PROJ4 : "patterson"
}, {
projection : "Plate Carrée",
PROJ4 : "latlong"
}, {
projection : "Miller cylindrical I",
PROJ4 : "mill"
}];
// Set default displays for the 3 different world distortion categories
var activeWorldEqAreaProj = "Equal Earth";
var activeWorldEqDistProj = "Oblique azimuthal equidistant";
var activeWorldComproProj = "Natural Earth";
// Set default point values for equidistant world map projections
var pole_eq = -90., lngP_eq = -180.;
var latC_eq = -39., lngC_eq = 145.;
var lat1_eq = 34., lng1_eq = -117., lat2_eq = 46., lng2_eq = 16.;
// this variable will later help set the styling of the active world projection choice
var activeProjection;
/*Main small-scale output function*/
function printWorld(property, center, scale, currentlyDragging) {
//cleaning the output
var outputTEXT = $("#result").empty();
//formating central meridian
var lng = worldValues(center.lng, scale);
//formating the output text
if (property == 'Equalarea') {
addWorldMapPreview(center, activeWorldEqAreaProj, currentlyDragging);
outputTEXT.append("<p><b>Equal-area world map projections with poles represented as points</b></p>");
//loop through global data
for (var i = 0; i < 2; i++) {
outputTEXT.append("<p class='outputText'><span onmouseover='updateWorldMap(\"" + listWorld[i].projection + "\")'><span data-proj-name='" + listWorld[i].projection + "'>" + listWorld[i].projection + "</span>" + stringLinks(listWorld[i].PROJ4, NaN, NaN, NaN, NaN, lng, NaN) + "</span></p>");
}
outputTEXT.append("<p><b>Equal-area world map projections with poles represented as lines</b></p>");
//loop through global data
for (var i = 2; i < 6; i++) {
outputTEXT.append("<p class='outputText'><span onmouseover='updateWorldMap(\"" + listWorld[i].projection + "\")'><span data-proj-name='" + listWorld[i].projection + "'>" + listWorld[i].projection + "</span>" + stringLinks(listWorld[i].PROJ4, NaN, NaN, NaN, NaN, lng, NaN) + "</span></p>");
}
worldCM(lng, outputTEXT);
}
else if (property == 'Equidistant') {
//output text
outputTEXT.append("<p><b>Equidistant world map projections</b></p>");
//making a select manue
outputTEXT.append("<div><div><select name='worldEquidistantMenu' id='worldEquidistantMenu'>" +
"<option value='Polar azimuthal equidistant'><b>Polar azimuthal equidistant</b></option>" +
"<option value='Oblique azimuthal equidistant'><b>Oblique azimuthal equidistant</b></option>" +
"<option value='Two-point equidistant'><b>Two-point equidistant</b></option></select></div><div id='worldEquidistantBox'></div>");
var menu = $("#worldEquidistantMenu").selectmenu( {
width: 230,
select: function( event, ui ) {
activeWorldEqDistProj = ui.item.value;
outputWorldEquidistantOption(center, scale);
updateWorldMap(activeWorldEqDistProj);
}
});
//set the menu to activeWorldEqDistProj
menu.val(activeWorldEqDistProj);
menu.selectmenu("refresh");
outputWorldEquidistantOption(center, scale);
addWorldMapPreview(center, activeWorldEqDistProj, currentlyDragging);
}
else {
// NOTE: property is equal to "Compromise" in this statement
outputTEXT.append("<p><b>Compromise world map projections</b></p>");
addWorldMapPreview(center, activeWorldComproProj, currentlyDragging);
//loop through global data
for (var i = 6; i < 9; i++) {
outputTEXT.append("<p class='outputText'><span onmouseover='updateWorldMap(\"" + listWorld[i].projection + "\")'><span data-proj-name='" + listWorld[i].projection + "'>" + listWorld[i].projection + "</span>" + stringLinks(listWorld[i].PROJ4, NaN, NaN, NaN, NaN, lng, NaN) + "</span></p>");
}
outputTEXT.append("<p><b>Compromise rectangular world map projections</b></p>");
//loop through global data
for (var i = 9; i < 12; i++) {
outputTEXT.append("<p class='outputText'><span onmouseover='updateWorldMap(\"" + listWorld[i].projection + "\")'><span data-proj-name='" + listWorld[i].projection + "'>" + listWorld[i].projection + "</span>" + stringLinks(listWorld[i].PROJ4, NaN, NaN, NaN, NaN, lng, NaN) + "</span></p>");
}
worldCM(lng, outputTEXT);
outputTEXT.append("<p><b>Note:</b> Rectangular projections are not generally recommended for most world maps.</p>");
}
}
function outputWorldEquidistantOption(center, scale) {
var outputTEXT = $("#worldEquidistantBox").empty();
//formating slider steps
var steps;
if ( document.getElementById("roundCM").checked || scale < 1.15 ) {
steps = 1.;
}
else if ( scale < 1.32 ) {
steps = 0.5;
}
else {
steps = 0.1;
}
//formating output
if ( activeWorldEqDistProj == "Polar azimuthal equidistant" ) {
lngP_eq = worldValues(center.lng, scale);
//formating pole name
var pole_str = pole_eq > 0 ? "North Pole" : "South Pole";
//creating the output
outputTEXT.append("<p class='outputText'>Distances are correct through or from the <span id='pole_str'>" + pole_str + " - " + stringLinks("aeqd", NaN, pole_eq, NaN, NaN, lngP_eq, NaN) + "</span><br></p>");
outputTEXT.append("<p class='outputText'>Center latitude: <span id='pole_val'>" + formatWorldLAT(pole_eq) + "</span></p>");
outputTEXT.append("<div class='sliderBox'><form id='pole_eq'>" +
"<input type='radio' name='pole_eq' id='North Pole' value='90'><label for='North Pole' style='font-size:11px;'>North Pole</label>" +
"<input type='radio' name='pole_eq' id='South Pole' value='-90'><label for='South Pole' style='font-size:11px;'>South Pole</label>" +
"</form></div>");
$( "#pole_eq" ).change( function( ) {
pole_eq = $('input[name=pole_eq]:checked').val();
pole_str = pole_eq > 0 ? "North Pole" : "South Pole";
document.getElementById("pole_val").innerHTML = formatWorldLAT(pole_eq);
document.getElementById("pole_str").innerHTML = pole_str + " - " + stringLinks("aeqd", NaN, pole_eq, NaN, NaN, lngP_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, true);
});
document.getElementById(pole_str).checked = true;
outputTEXT.append("<p class='outputText'>Central meridian: <span id='lngP_val'>" + formatWorldLON(lngP_eq) + "</span></p>");
outputTEXT.append("<div class='sliderBox'><div class='sliderTextL'>" + formatWorldLON(-180.0) + "</div><div class='sliderTextR'>" + formatWorldLON(180.0) + "</div><div id='lngP_eq' class='slider'></div></div>");
$( "#lngP_eq" ).slider({
min: -180.0,
max: 180.0,
step: steps,
value: lngP_eq,
slide: function( event, ui ) {
lngP_eq = ui.value;
document.getElementById("lngP_val").innerHTML = formatWorldLON(lngP_eq);
document.getElementById("pole_str").innerHTML = pole_str + " - " + stringLinks("aeqd", NaN, pole_eq, NaN, NaN, lngP_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, true);
},
stop: function( event, ui ) {
lngP_eq = ui.value;
document.getElementById("lngP_val").innerHTML = formatWorldLON(lngP_eq);
document.getElementById("pole_str").innerHTML = pole_str + " - " + stringLinks("aeqd", NaN, pole_eq, NaN, NaN, lngP_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, false);
}
});
}
else if ( activeWorldEqDistProj == "Oblique azimuthal equidistant" ) {
lngC_eq = worldValues(center.lng, scale);
latC_eq = worldValues(center.lat, scale);
outputTEXT.append("<p class='outputText'>Distances are correct through or from the center - <span id='aeqd_str'>" + stringLinks("aeqd", NaN, latC_eq, NaN, NaN, lngC_eq, NaN) + "</span></br></p>");
outputTEXT.append("<p class='outputText'>Center latitude: <span id='latC_val'>" + formatWorldLAT(latC_eq) + "</span></p>");
outputTEXT.append("<div class='sliderBox'><div class='sliderTextL'>" + formatWorldLAT(-90.0) + "</div><div class='sliderTextR'>" + formatWorldLAT(90.0) + "</div><div id='latC_eq' class='slider'></div></div>");
$( "#latC_eq" ).slider({
min: -90.0,
max: 90.0,
step: steps,
value: latC_eq,
slide: function( event, ui ) {
latC_eq = ui.value;
document.getElementById("latC_val").innerHTML = formatWorldLAT(latC_eq);
document.getElementById("aeqd_str").innerHTML = stringLinks("aeqd", NaN, latC_eq, NaN, NaN, lngC_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, true);
},
stop: function( event, ui ) {
latC_eq = ui.value;
document.getElementById("latC_val").innerHTML = formatWorldLAT(latC_eq);
document.getElementById("aeqd_str").innerHTML = stringLinks("aeqd", NaN, latC_eq, NaN, NaN, lngC_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, false);
}
});
outputTEXT.append("<p class='outputText'>Center longitude: <span id='lngC_val'>" + formatWorldLON(lngC_eq) + "</span></p>");
outputTEXT.append("<div class='sliderBox'><div class='sliderTextL'>" + formatWorldLON(-180.0) + "</div><div class='sliderTextR'>" + formatWorldLON(180.0) + "</div><div id='lngC_eq' class='slider'></div></div>");
$( "#lngC_eq" ).slider({
min: -180.0,
max: 180.0,
step: steps,
value: lngC_eq,
slide: function( event, ui ) {
lngC_eq = ui.value;
document.getElementById("lngC_val").innerHTML = formatWorldLON(lngC_eq);
document.getElementById("aeqd_str").innerHTML = stringLinks("aeqd", NaN, latC_eq, NaN, NaN, lngC_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, true);
},
stop: function( event, ui ) {
lngC_eq = ui.value;
document.getElementById("lngC_val").innerHTML = formatWorldLON(lngC_eq);
document.getElementById("aeqd_str").innerHTML = stringLinks("aeqd", NaN, latC_eq, NaN, NaN, lngC_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, false);
}
});
}
else if ( activeWorldEqDistProj == "Two-point equidistant" ) {
outputTEXT.append("<p class='outputText'>Distances are correct through or from two arbitrary points - <span id='tpeqd_str'>" + stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN) + "</span></p>");
outputTEXT.append("<p class='outputText'>First latitude: <span id='lat1_val'>" + formatWorldLAT(lat1_eq) + "</span></p>");
outputTEXT.append("<div class='sliderBox'><div class='sliderTextL'>" + formatWorldLAT(-90.0) + "</div><div class='sliderTextR'>" + formatWorldLAT(90.0) + "</div><div id='lat1_eq' class='slider'></div></div>");
$( "#lat1_eq" ).slider({
min: -90.0,
max: 90.0,
step: steps,
value: lat1_eq,
slide: function( event, ui ) {
lat1_eq = ui.value;
document.getElementById("lat1_val").innerHTML = formatWorldLAT(lat1_eq);
document.getElementById("tpeqd_str").innerHTML = stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, true);
},
stop: function( event, ui ) {
lat1_eq = ui.value;
document.getElementById("lat1_val").innerHTML = formatWorldLAT(lat1_eq);
document.getElementById("tpeqd_str").innerHTML = stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, false);
}
});
outputTEXT.append("<p class='outputText'>First longitude: <span id='lng1_val'>" + formatWorldLON(lng1_eq) + "</span></p>");
outputTEXT.append("<div class='sliderBox'><div class='sliderTextL'>" + formatWorldLON(-180.0) + "</div><div class='sliderTextR'>" + formatWorldLON(180.0) + "</div><div id='lng1_eq' class='slider'></div></div>");
$( "#lng1_eq" ).slider({
min: -180.0,
max: 180.0,
step: steps,
value: lng1_eq,
slide: function( event, ui ) {
lng1_eq = ui.value;
document.getElementById("lng1_val").innerHTML = formatWorldLON(lng1_eq);
document.getElementById("tpeqd_str").innerHTML = stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, true);
},
stop: function( event, ui ) {
lng1_eq = ui.value;
document.getElementById("lng1_val").innerHTML = formatWorldLON(lng1_eq);
document.getElementById("tpeqd_str").innerHTML = stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, false);
}
});
outputTEXT.append("<p class='outputText'>Second latitude: <span id='lat2_val'>" + formatWorldLAT(lat2_eq) + "</span></p>");
outputTEXT.append("<div class='sliderBox'><div class='sliderTextL'>" + formatWorldLAT(-90.0) + "</div><div class='sliderTextR'>" + formatWorldLAT(90.0) + "</div><div id='lat2_eq' class='slider'></div></div>");
$( "#lat2_eq" ).slider({
min: -90.0,
max: 90.0,
step: steps,
value: lat2_eq,
slide: function( event, ui ) {
lat2_eq = ui.value;
document.getElementById("lat2_val").innerHTML = formatWorldLAT(lat2_eq);
document.getElementById("tpeqd_str").innerHTML = stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, true);
},
stop: function( event, ui ) {
lat2_eq = ui.value;
document.getElementById("lat2_val").innerHTML = formatWorldLAT(lat2_eq);
document.getElementById("tpeqd_str").innerHTML = stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, false);
}
});
outputTEXT.append("<p class='outputText'>Second longitude: <span id='lng2_val'>" + formatWorldLON(lng2_eq) + "</span></p>");
outputTEXT.append("<div class='sliderBox'><div class='sliderTextL'>" + formatWorldLON(-180.0) + "</div><div class='sliderTextR'>" + formatWorldLON(180.0) + "</div><div id='lng2_eq' class='slider'></div></div>");
$( "#lng2_eq" ).slider({
min: -180.0,
max: 180.0,
step: steps,
value: lng2_eq,
slide: function( event, ui ) {
lng2_eq = ui.value;
document.getElementById("lng2_val").innerHTML = formatWorldLON(lng2_eq);
document.getElementById("tpeqd_str").innerHTML = stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, true);
},
stop: function( event, ui ) {
lng2_eq = ui.value;
document.getElementById("lng2_val").innerHTML = formatWorldLON(lng2_eq);
document.getElementById("tpeqd_str").innerHTML = stringLinks("tpeqd", NaN, lat1_eq, lng1_eq, lat2_eq, lng2_eq, NaN);
addWorldMapPreview(center, activeWorldEqDistProj, false);
}
});
}
else {
outputTEXT.append("<p></p><p></p><p>Equidistant world map projection not avaliable</p><p></p><p></p>");
}
}
/***PRINTING HEMISPHERE MAP PROJECTIONS***/
function printHemisphere(property, center, scale) {
//cleaning the output
var outputTEXT = $("#result").empty();
//Formating central meridian
var lon = Math.round(center.lng * 100.) / 100., lonStr, latStr;
//Formating central meridian string
if ( angUnit == "DMS" ){
if (lon < 0)
lonStr = Math.abs(lon) + "º W";
else
lonStr = lon + "º E";
} else {
lonStr = lon + "º";
}
//Formating the output text
if ((Math.abs(latmax) < 23.43665) && (Math.abs(latmin) < 23.43665)) {
//Defining std. parallel
var interval = (latmax - latmin) / 4.;
var latS1 = center.lat + interval, latS2 = center.lat - interval, latStd;
if ((latS1 > 0. && latS2 > 0.) || (latS1 < 0. && latS2 < 0.)) {
latStd = Math.max(Math.abs(latmax), Math.abs(latmin)) / 2.;
} else {
latStd = 0.;
}
latStd = Math.round(latStd * 100.) / 100.;
//Formating std. parallel string
if ( angUnit == "DMS" ){
if (latStd < 0)
latStr = Math.abs(latStd) + "º S";
else
latStr = latStd + "º N";
} else {
latStr = latStd + "º";
}
//Formating the output text
if (property == 'Equalarea') {
previewMapProjection = activeProjection = "Cylindrical equal area";
outputTEXT.append("<p><b>Equal-area projection for maps showing the tropics</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Cylindrical equal-area</span>" +
stringLinks("cea", NaN, NaN, latStd, NaN, lon, NaN) + "</p>");
} else if (property == "Conformal") {
previewMapProjection = activeProjection = "Mercator";
outputTEXT.append("<p><b>Conformal projection for maps showing the tropics</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Mercator</span>" +
stringLinks("merc", NaN, NaN, latStd, NaN, lon, NaN) + "</p>");
} else if (property == "Equidistant") {
previewMapProjection = activeProjection = "Equidistant cylindrical";
outputTEXT.append("<p><b>Equidistant projection for maps showing the tropics</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Equidistant cylindrical</span>" +
stringLinks("eqc", NaN, NaN, latStd, NaN, lon, NaN) + " - distance correct along meridians</p>");
}
outputTEXT.append("<p class='outputText'>Standard parallel: " + latStr + "</p>");
outputTEXT.append("<p class='outputText'>Central meridian: " + lonStr + "</p>");
previewMapLat0 = 0;
}
else {
//Formating central latitude
var lat;
if (center.lat > 85.) {
lat = 90.0;
} else if (center.lat < -85.) {
lat = -90.0;
} else {
lat = Math.round(center.lat * 100.) / 100.;
}
//Formating central latitude string
if ( angUnit == "DMS" ){
if (lat < 0)
latStr = Math.abs(lat) + "º S";
else
latStr = lat + "º N";
} else {
latStr = lat + "º";
}
//Formating the output text
if (property == 'Equalarea') {
previewMapProjection = activeProjection = "Azimuthal equal area";
outputTEXT.append("<p><b>Equal-area projection for maps showing a hemisphere</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Lambert azimuthal equal-area projection</span>" +
stringLinks("laea", NaN, lat, NaN, NaN, lon, NaN) + "</p>");
} else if (property == "Equidistant") {
previewMapProjection = activeProjection = "Azimuthal equidistant";
outputTEXT.append("<p><b>Equidistant projection for maps showing a hemisphere</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Azimuthal equidistant</span>" +
stringLinks("aeqd", NaN, lat, NaN, NaN, lon, NaN) + "</p>");
}
outputTEXT.append("<p class='outputText'>Center latitude: " + latStr + "</p>");
outputTEXT.append("<p class='outputText'>Center longitude: " + lonStr + "</p>");
previewMapLat0 = lat;
}
}
/***PRINTING LARGE-SCALE MAP PROJECTIONS***/
// Set default display for the equidistant projection between pole and equator
var activeEqDistProj = "Equidistant conic";
/*Main large-scale output function*/
function printSmallerArea(property, center, scale) {
//cleaning the output
var outputTEXT = $("#result").empty();
//computing longitude extent
var dlon = (lonmax - lonmin);
//reading central meridian
var lng = outputLON(center.lng, false);
//getting the height-to-width ratio
var ratio = (latmax - latmin) / dlon;
if (latmin > 0.0) {
ratio /= Math.cos (latmin * Math.PI / 180);
} else if (latmax < 0.0) {
ratio /= Math.cos (latmax * Math.PI / 180);
}
//formating the output text
if (property == 'Equidistant') {
outputTEXT.append("<p><b>Regional map projection with correct scale along some lines.</b></p>");
//case: close to poles
if (center.lat > 70) {
previewMapProjection = activeProjection = "Azimuthal equidistant";
previewMapLat0 = 90;
outputTEXT.append("<p><span data-proj-name='" + activeProjection + "'>Polar azimuthal equidistant</span>" +
stringLinks("aeqd", NaN, 90.0, NaN, NaN, center.lng, NaN) +
" - distance correct along any line passing through the pole (i.e., meridian)<br>Central meridian: " + lng + "</p>");
}
else if (center.lat < -70) {
previewMapProjection = activeProjection = "Azimuthal equidistant";
previewMapLat0 = -90;
outputTEXT.append("<p><span data-proj-name='" + activeProjection + "'>Polar azimuthal equidistant</span>" +
stringLinks("aeqd", NaN, -90.0, NaN, NaN, center.lng, NaN) +
" - distance correct along any line passing through the pole (i.e., meridian)<br>Central meridian: " + lng + "</p>");
}
//case: with an north-south extent
else if (ratio > 1.25) {
previewMapProjection = activeProjection = "Cassini";
previewMapLat0 = 0;
outputTEXT.append("<p><span data-proj-name='" + activeProjection + "'>Cassini</span>" +
stringLinks("cass", NaN, NaN, NaN, NaN, center.lng, NaN) +
" - distance correct along any line perpendicular to the central meridian<br>Central meridian: " + lng + "</p>");
}
//case: close to equator
else if (center.lat > -15. && center.lat < 15.) {
previewMapProjection = activeProjection = "Equidistant cylindrical";
previewMapLat0 = 0;
var interval = (latmax - latmin) / 4.;
var latS1 = center.lat + interval, latS2 = center.lat - interval, latS;
if ((latS1 > 0. && latS2 > 0.) || (latS1 < 0. && latS2 < 0.))
latS = Math.max(Math.abs(latmax), Math.abs(latmin)) / 2.;
else
latS = 0.;
outputTEXT.append("<p><span data-proj-name='" + activeProjection + "'>Equidistant cylindrical</span>" +
stringLinks("eqc", NaN, NaN, latS, NaN, center.lng, NaN) +
" - distance correct along meridians<br>Standard parallel: " + outputLAT(latS, false) + "<br>Central meridian: " + lng + "</p>");
}
//case: between pole and equator
else {
//computing standard paralles
var interval = (latmax - latmin) / 6;
var latOr = outputLAT(center.lat, false);
var latS1 = outputLAT(latmin + interval, false);
var latS2 = outputLAT(latmax - interval, false);
//updates the active projection
activeProjection = previewMapProjection = activeEqDistProj;
previewMapLat0 = center.lat;
//formating the output
outputTEXT.append("<p class='outputText'><span onmouseover='updateEquidistantMap(\"Equidistant conic\")'><span data-proj-name='Equidistant conic'><b>Equidistant conic</b></span>" +
stringLinks("eqdc", NaN, center.lat, latmin + interval, latmax - interval, center.lng, NaN) +
" - distance correct along meridians</span></p>");
outputTEXT.append("<p class='outputText'><span onmouseover='updateEquidistantMap(\"Equidistant conic\")'>Latitude of origin: " + latOr + "<br>Standard parallel 1: " + latS1 + "<br>Standard parallel 2: " + latS2 + "<br>Central meridian: " + lng + "</span></p>");
outputTEXT.append("<p class='outputText'><br><span onmouseover='updateEquidistantMap(\"Azimuthal equidistant\")'><span data-proj-name='Azimuthal equidistant' ><b>Oblique azimuthal equidistant</b></span>" +
stringLinks("aeqd", NaN, center.lat, NaN, NaN, center.lng, NaN) +
" - distance correct along any line passing through the center of the map (i.e., great circle)</span></p>");
outputTEXT.append("<p class='outputText'><span onmouseover='updateEquidistantMap(\"Azimuthal equidistant\")'>Center latitude: " + outputLAT(center.lat, false) + "<br>Center longitude: " + lng + "</span></p>");
}
outputTEXT.append('<p><b>Note:</b> In some rare cases, it is useful to retain scale along great circles in regional and large-scale maps. Map readers can make precise measurements along these lines that retain scale. It is important to remember that no projection is able to correctly display all distances and that only some distances are retained correctly by these "equidistant" projections.</p>');
}
//case: very large scale, Universal Polar Stereographic - North Pole
else if ((latmin >= 84.) && (property == "Conformal")) {
//formating the output
previewMapProjection = activeProjection = "Stereographic";
previewMapLat0 = 90;
outputTEXT.append("<p><b>Conformal projection at very large map scale</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar stereographic</span>" +
stringLinks("stere", NaN, 90.0, NaN, NaN, center.lng, 0.994) + "</p>");
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
outputTEXT.append("<p class='outputText'>Scale factor: 0.994</p>");
}
//case: very large scale, Universal Polar Stereographic - South Pole
else if ((latmax <= -80.) && (property == "Conformal")) {
//formating the output
previewMapProjection = activeProjection = "Stereographic";
previewMapLat0 = -90;
outputTEXT.append("<p><b>Conformal projection at very large map scale</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar stereographic</span>" +
stringLinks("stere", NaN, -90.0, NaN, NaN, center.lng, 0.994) + "</p>");
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
outputTEXT.append("<p class='outputText'>Scale factor: 0.994</p>");
}
//case: very large scale, like on "state plane" coord. sys.
else if ((dlon <= 3.) && (property == "Conformal")) {
//formating the output
previewMapProjection = activeProjection = "Transverse Mercator";
previewMapLat0 = 0;
outputTEXT.append("<p><b>Conformal projection at very large map scale</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Transverse Mercator</span>" +
stringLinks("tmerc", 500000.0, NaN, NaN, NaN, center.lng, 0.9999) + "</p>");
outputTEXT.append("<p class='outputText'>False easting: 500000.0</p>");
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
outputTEXT.append("<p class='outputText'>Scale factor: 0.9999</p>");
}
//case: very large scale, like Universal Transverse Mercator
else if ( (dlon <= 6.) && (property == "Conformal")) {
//formating the output
previewMapProjection = activeProjection = "Transverse Mercator";
previewMapLat0 = 0;
outputTEXT.append("<p><b>Conformal projection at very large map scale</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Transverse Mercator</span>" +
stringLinks("tmerc", 500000.0, NaN, NaN, NaN, center.lng, 0.9996) + "</p>");
outputTEXT.append("<p class='outputText'>False easting: 500000.0</p>");
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
outputTEXT.append("<p class='outputText'>Scale factor: 0.9996</p>");
}
else {
//Different map formats
if (ratio > 1.25) {
//Regional maps with an north-south extent
printNSextent(property, center);
} else if (ratio < 0.8) {
//Regional maps with an east-west extent
printEWextent(property, center, scale);
} else {
//Regional maps in square format
printSquareFormat(property, center);
}
}
if (scale > 260) {
//general note for maps showing a smaller area
outputTEXT.append("<p class='outputText'>_________________________________________<br>For maps at this scale, you can also use the state’s official projection. Most countries use a conformal projection for their official large-scale maps. You can search for official projections by area of interest in the <a target='_blank' href='http://www.epsg-registry.org/'>EPSG Geodetic Parameter Registry</a>.</p>");
}
}
/*Funcion for regional maps in square format*/
function printSquareFormat(property, center) {
//cleaning the output
var outputTEXT = $("#result").empty();
//computing central meridian
var lng = outputLON(center.lng, false);
//formating the output
if (property == "Conformal") {
outputTEXT.append("<p><b>Conformal projection for regional maps in square format</b></p>");
previewMapProjection = activeProjection = "Stereographic";
} else if (property == 'Equalarea') {
outputTEXT.append("<p><b>Equal-area projection for regional maps in square format</b></p>");
previewMapProjection = activeProjection = "Azimuthal equal area";
}
//case: close to poles
if (center.lat > 75.) {
previewMapLat0 = 90;
if (property == "Conformal") {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar stereographic</span>" +
stringLinks("stere", NaN, 90.0, NaN, NaN, center.lng, NaN) + "</p>");
} else if (property == 'Equalarea') {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar Lambert azimuthal equal-area</span>" +
stringLinks("laea", NaN, 90.0, NaN, NaN, center.lng, NaN) + "</p>");
}
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
}
else if (center.lat < -75.) {
previewMapLat0 = -90;
if (property == "Conformal") {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar stereographic</span>" +
stringLinks("stere", NaN, -90.0, NaN, NaN, center.lng, NaN) + "</p>");
} else if (property == 'Equalarea') {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar Lambert azimuthal equal-area</span>" +
stringLinks("laea", NaN, -90.0, NaN, NaN, center.lng, NaN) + "</p>");
}
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
}
//case: close to equator
else if (center.lat > -15. && center.lat < 15.) {
previewMapLat0 = 0;
if (property == "Conformal") {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Equatorial stereographic</span>"
+ stringLinks("stere", NaN, 0.0, NaN, NaN, center.lng, NaN) + "</p>");
} else if (property == 'Equalarea') {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Equatorial Lambert azimuthal equal-area</span>"
+ stringLinks("laea", NaN, 0.0, NaN, NaN, center.lng, NaN) + "</p>");
}
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
}
//case: between pole and equator
else {
//formating coordinates of the center
var center_text = "Center latitude: " + outputLAT(center.lat, false) + "<br>Center longitude: " + lng;
previewMapLat0 = center.lat;
if (property == "Conformal") {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Oblique stereographic</span>"
+ stringLinks("stere", NaN, center.lat, NaN, NaN, center.lng, NaN) + "</p>");
} else if (property == 'Equalarea') {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Oblique Lambert azimuthal equal-area</span>"
+ stringLinks("laea", NaN, center.lat, NaN, NaN, center.lng, NaN) + "</p>");
}
outputTEXT.append("<p class='outputText'>" + center_text + "</p>");
}
printScaleFactorNote(outputTEXT, property);
}
/*Funcion for regional maps with an north-south extent*/
function printNSextent(property, center) {
//cleaning the output
var outputTEXT = $("#result").empty();
//computing central meridian
var lng = outputLON(center.lng, false);
//formating the output
if (property == "Conformal") {
previewMapProjection = activeProjection = "Transverse Mercator";
outputTEXT.append("<p><b>Conformal projection for regional maps with an north-south extent</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Transverse Mercator</span>" +
stringLinks("tmerc", NaN, NaN, NaN, NaN, center.lng, NaN) + "</p>");
} else if (property == 'Equalarea') {
previewMapProjection = activeProjection = "Transverse cylindrical equal area";
outputTEXT.append("<p><b>Equal-area projection for regional maps with an north-south extent</b></p>");
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Transverse cylindrical equal-area</span>" +
stringLinks("tcea", NaN, NaN, NaN, NaN, center.lng, NaN) + "</p>");
}
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
previewMapLat0 = 0;
//formating the output note
printScaleFactorNote(outputTEXT, property);
if (property == "Equalarea") {
outputTEXT.append("<p><b>Note:</b> To reduce overall distortion on the map, one can also compress the map in the north-south direction (with a factor <i>s</i>) and expand the map in east-west direction (with a factor 1 / <i>s</i>). The factor <i>s</i> can be determined with a trial-and-error approach, comparing the distortion patterns along the center and at the border of the map.</p>");
}
}
/*Funcion for regional maps with an east-west extent*/
function printEWextent(property, center, scale) {
//cleaning the output
var outputTEXT = $("#result").empty();
//computing central meridian
var lng = outputLON(center.lng, false);
//Show scale note
var scaleNote = false;
//formating the output
if (property == "Conformal") {
outputTEXT.append("<p><b>Conformal projection for regional maps with an east-west extent</b></p>");
} else if (property == 'Equalarea') {
outputTEXT.append("<p><b>Equal-area projection for regional maps with an east-west extent</b></p>");
}
//case: close to poles
if (center.lat > 70) {
previewMapLat0 = 90;
if (property == "Conformal") {
previewMapProjection = activeProjection = "Stereographic";
scaleNote = true;
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar stereographic</span>" +
stringLinks("stere", NaN, 90.0, NaN, NaN, center.lng, NaN) + "</p>");
} else if (property == 'Equalarea') {
previewMapProjection = activeProjection = "Azimuthal equal area";
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar Lambert azimuthal equal-area</span>" +
stringLinks("laea", NaN, 90.0, NaN, NaN, center.lng, NaN) + "</p>");
}
}
else if (center.lat < -70) {
previewMapLat0 = -90;
if (property == "Conformal") {
previewMapProjection = activeProjection = "Stereographic";
scaleNote = true;
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar stereographic</span>" +
stringLinks("stere", NaN, -90.0, NaN, NaN, center.lng, NaN) + "</p>");
} else if (property == 'Equalarea') {
previewMapProjection = activeProjection = "Azimuthal equal area";
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar Lambert azimuthal equal-area</span>" +
stringLinks("laea", NaN, -90.0, NaN, NaN, center.lng, NaN) + "</p>");
}
}
//case: close to equator
else if (center.lat > -15. && center.lat < 15.) {
previewMapLat0 = 0;
var interval = (latmax - latmin) / 4.;
var latS1 = center.lat + interval, latS2 = center.lat - interval, latS;
if ((latS1 > 0. && latS2 > 0.) || (latS1 < 0. && latS2 < 0.))
latS = Math.max(Math.abs(latmax), Math.abs(latmin)) / 2.;
else
latS = 0.;
if (property == "Conformal") {
previewMapProjection = activeProjection = "Mercator";
scaleNote = true;
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Mercator</span>" +
stringLinks("merc", NaN, NaN, latS, NaN, center.lng, NaN) + "</p>");
} else if (property == 'Equalarea') {
previewMapProjection = activeProjection = "Cylindrical equal area";
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Cylindrical equal-area</span>" +
stringLinks("cea", NaN, NaN, latS, NaN, center.lng, NaN) + "</p>");
}
outputTEXT.append("<p class='outputText'>Standard parallel: " + outputLAT(latS, false) + "</p>");
}
//case: between pole and equator
else {
//formating coordinates of the center
var interval = (latmax - latmin) / 6.;
var latOr = outputLAT(center.lat, false);
var latS1 = outputLAT(latmin + interval, false);
var latS2 = outputLAT(latmax - interval, false);
previewMapLat0 = center.lat;
if (property == "Conformal") {
previewMapProjection = activeProjection = "Lambert conformal conic";
//Check if the fan of the selected extent exposes a cone opening at a pole
if (checkConicOK(center.lat, center.lng, previewMapProjection) > 0) {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Lambert conformal conic</span>" +
stringLinks("lcc", NaN, center.lat, latmin + interval, latmax - interval, center.lng, NaN) + '</p>');
outputTEXT.append("<p class='outputText'>Latitude of origin: " + latOr + "<br>Standard parallel 1: " + latS1 + "<br>Standard parallel 2: " + latS2 + "</p>");
}
//When the fan of the selected extent exposes a cone opening at a pole
else {
previewMapProjection = activeProjection = "Stereographic";
scaleNote = true;
//North Pole case
if (center.lat > 0) {
previewMapLat0 = 90;
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar stereographic</span>" +
stringLinks("stere", NaN, 90.0, NaN, NaN, center.lng, NaN) + "</p>");
}
//South Pole case
else {
previewMapLat0 = -90;
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar stereographic</span>" +
stringLinks("stere", NaN, -90.0, NaN, NaN, center.lng, NaN) + "</p>");
}
}
}
else if (property == 'Equalarea') {
previewMapProjection = activeProjection = "Albers equal area conic";
//Check if the fan of the selected extent exposes a cone opening at a pole
var conicTest = checkConicOK(center.lat, center.lng, previewMapProjection);
if (conicTest > 0) {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Albers equal-area conic</span>" +
stringLinks("aea", NaN, center.lat, latmin + interval, latmax - interval, center.lng, NaN) + '</p>');
outputTEXT.append("<p class='outputText'>Latitude of origin: " + latOr + "<br>Standard parallel 1: " + latS1 + "<br>Standard parallel 2: " + latS2 + "</p>");
}
//When the fan of the selected extent exposes a cone opening at a pole
else {
previewMapProjection = activeProjection = "Azimuthal equal area";
//Case when the fan of the selected extent spans less than 180deg around a pole
if (conicTest == 0) {
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Oblique Lambert azimuthal equal-area</span>" +
stringLinks("laea", NaN, center.lat, NaN, NaN, center.lng, NaN) + "</p>");
outputTEXT.append("<p class='outputText'>Latitude of origin: " + outputLAT(center.lat, false) + "</p>");
}
//North Pole case
else if (center.lat > 0) {
previewMapLat0 = 90;
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar Lambert azimuthal equal-area</span>" +
stringLinks("laea", NaN, 90.0, NaN, NaN, center.lng, NaN) + "</p>");
}
//South Pole case
else {
previewMapLat0 = -90;
outputTEXT.append("<p class='outputText'><span data-proj-name='" + activeProjection + "'>Polar Lambert azimuthal equal-area</span>" +
stringLinks("laea", NaN, -90.0, NaN, NaN, center.lng, NaN) + "</p>");
}
}
}
}
outputTEXT.append("<p class='outputText'>Central meridian: " + lng + "</p>");
//printing the scale factor note when case is close to pole or equator
if (scaleNote) {
printScaleFactorNote(outputTEXT, property);
}
}