download overview-summary-kaXmlOverlay.js.html
Language: NonCode
LOC: 0
Project Info
ka-map
Server: Maptools
Type: cvs
Maptools\k\ka‑map\ka‑map\docs\
   _BrowserIdent.html
   _eventManager.html
   _layer.html
   _map.html
   _overlayLayer.html
   _queueManager.html
   _wmsLayer.html
   allclasses-frame.html
   allclasses-noframe.html
   GLOBALS.html
   help-doc.html
   index-all.html
   index.html
   kaDoc.html
   kaKeymap.html
   kaLegend.html
   kaMap.html
   kaNavigator.html
   kaOverlay.html
   kaQuery.html
   kaTool.html
   kaXmlFeature.html
   kaXmlGraphicElement.html
   kaXmlIcon.html
   kaXmlLabel.html
   kaXmlLinestring.html
   kaXmlOverlay.html
   kaXmlPoint.html
   kaXmlPolygon.html
   kaXmlSymbol.html
   overview-DHTMLapi.js.html
   overview-frame.html
   overview-kaKeymap.js.html
   overview-kaLegend.js.html
   overview-kaMap.js.html
   overview-kaOverlay.js.html
   overview-kaQuery.js.html
   ...view-kaScalebar.js.html
   overview-kaTool.js.html
   ...ew-kaXmlOverlay.js.html
   overview-kaZoomer.js.html
   ...ew-overlayLayer.js.html
   overview-scalebar.js.html
   ...ummary-DHTMLapi.js.html
   ...ummary-kaKeymap.js.html
   ...ummary-kaLegend.js.html
   ...w-summary-kaMap.js.html
   ...mmary-kaOverlay.js.html
   ...summary-kaQuery.js.html
   ...mary-kaScalebar.js.html
   ...-summary-kaTool.js.html
   ...ry-kaXmlOverlay.js.html
   ...ummary-kaZoomer.js.html
   ...ry-overlayLayer.js.html
   ...ummary-scalebar.js.html
   ...ummary-wmsLayer.js.html
   ...iew-summary-xhr.js.html
   overview-summary.html
   overview-tree.html
   overview-wmsLayer.js.html
   overview-xhr.js.html
   ScaleBar.html
   stylesheet.css

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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
ka-Map Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="kaXmlOverlay.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b>ka-Map</b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>kaXmlOverlay.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		No overview generated for 'kaXmlOverlay.js'<BR/><BR/>
	
</p>

<hr>


    <table border="1" cellpadding="3" cellspacing="0" width="100%">
    <tr bgcolor="#CCCCFF" class="TableHeadingColor">
    <td colspan=2><font size="+2">
    
        <b>Class Summary</b>
    
    </font></td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="_BrowserIdent.html">_BrowserIdent</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlFeature.html">kaXmlFeature</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlGraphicElement.html">kaXmlGraphicElement</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlIcon.html">kaXmlIcon</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlLabel.html">kaXmlLabel</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlLinestring.html">kaXmlLinestring</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlOverlay.html">kaXmlOverlay</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlPoint.html">kaXmlPoint</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlPolygon.html">kaXmlPolygon</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="kaXmlSymbol.html">kaXmlSymbol</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    </table>
    <hr/> 


<!-- ========== METHOD SUMMARY =========== -->

	<a name="method_summary"><!-- --></a>
	<table border="1" cellpadding="3" cellspacing="0" width="100%">
		<tr bgcolor="#CCCCFF" class="TableHeadingColor">
			<td colspan=2>
				<font size="+2">
					<b>Method Summary</b>
				</font>
			</td>
		</tr>
	
		
		   <tr bgcolor="white" class="TableRowColor">
		      <td align="right" valign="top" width="1%">
			 <font size="-1">
			    <code>static&nbsp;Object</code>
			 </font>
		      </td>
		      <td>
			 <code>
			    <b>
			       <a href="GLOBALS.html#!s!loadXMLDoc">loadXMLDoc</a></b>(url)
			 </code>
			 <br>
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 retrieve XML document as document object


		      </td>
		   </tr>
		
	
	</table>
    <p>

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="comment">/******************************************************************************
 * kaXmlOverlay - XML server side generated overlay for kaMap.
 *
 * Piergiorgio Navone 
 *
 * $Id: overview-summary-kaXmlOverlay.js.html,v 1.1 2006/03/15 15:56:59 pspencer Exp $
 *****************************************************************************/</span>
 
<span class="comment">/******************************************************************************
 * BEGIN section in Wiki syntax
 
!!! kaXmlOverlay Quick HOW-TO

* __1__ Import scripts in your page:

 &lt;script type="text/javascript" src="wz_jsgraphics.js"&gt;&lt;/script&gt;
 &lt;script type="text/javascript" src="kaXmlOverlay.js"&gt;&lt;/script&gt;

* __2__ Let ka-Map initialize itself: the next steps should wait at lest the KAMAP_MAP_INITIALIZED event.

* __3__ Create a kaXmlOverlay object:

 myXmlOverlay = new kaXmlOverlay( myKaMap, 250 );

* __4__ Add some objects on the overlay layer. There are two ways to do that

** Call the loadXml method: this method load an XML document from the web server.

 myXmlOverlay.loadXml('points.xml');

** Write a JavaScript function to add your objects:

 var my_point = myXmlOverlay.addNewPoint('Point ID', longuitude, latitude);
 var my_symbol = new kaXmlSymbol();
 my_symbol.size = 12;
 my_symbol.color = '#ff0000';
 my_point.addGraphic(my_symbol);


* __5__ To have a periodic update:

 myInterval = setInterval("myMovingOverlay.loadXml('xmlget.php')",5000);


--------------------------------------------

!!! kaXmlOverlay Reference

This document describe the interface of the JavaScript kaXmlOverlay library as well as the XLM documents describing overlays. The document is divided in tree sections:

# A summary of JavaScript objects and functions
# The definition of the XML
# An in deep description of attributes common to both XML and JavaScript functions


!! JavaScript API

In this section there is a list of main classes with methods an properties that you ca use to programmatically add overlays to your map.
A detailed an updated documentation for each function is maintained as JavaDoc like comments in the source code.


! Class kaXmlOverlay

This class represent a map layer where is possible to add overlays.
To instantiate this class use the constructor
 
 kaXmlOverlay( oKaMap, xml_url )
;oKaMap: A kaMap object
;zIndex: The z index of the layer


To load an XML document with overlay description call the method

 kaXmlOverlay.prototype.loadXml = function(xml_url)
;xml_url: URL of th XML with points to plot


To add a new point to an overlay

 kaXmlOverlay.prototype.addNewPoint = function(pid, x, y)
;pid: Point ID
;x: X geo-coordinate
;y: Y geo-coordinate
;return: A kaXmlPoint object with the given point ID.


To retrieve an existing point from an overlay call

 kaXmlOverlay.prototype.getPointObject = function(pid)
;pid: Point ID
;return: The kaXmlPoint object given the point ID. null if not found.


To remove one or more points from the overlay

kaXmlOverlay.prototype.removePoint = function( pid )
;pid: Point ID or a regexp. If pid is null or not present remove all points.


! Class kaXmlPoint
A kaXmlPoint represents a group of graphic object on the overlay layer. The point is placed on the map at specified geographic coordinates. A point can be moved on the map without the need of redrawing all its graphic objects. 

To instantiate a new point don't use the constructor but call the ''kaXmlOverlay.addNewPoint()'' function.


To place or move a kaXmlPoint on the map call

 kaXmlPoint.prototype.setPosition = function( x, y )
;x: X geo-coordinate
;y: Y geo-coordinate


To clear all graphics associated with the point call the method

 kaXmlPoint.prototype.clear = function()


To add graphic objects to a point use the method

 kaXmlPoint.prototype.addGraphic = function( obj )
;obj: an object of type kaXmlSymbol, kaXmlIcon, kaXmlLabel, kaXmlLinestring or kaXmlPolygon


To manually set the HTML content of a kaXmlPoint use the method

 kaXmlPoint.prototype.setInnerHtml = function(ihtml)
;ihtml: A string containing the HTML

This function delete any other content of the point.


! Graphic objects classes
The graphic objects that can be displayed are:

* kaXmlSymbol
* kaXmlLabel
* kaXmlIcon
* kaXmlLinestring
* kaXmlPolygon

All this classes have a constructor without parameters and different attributes: the attributes are described in the following of the document.

To use one of these objects create a new instance, configure it setting its properties ad add it to a ''kaXmlPoint'' with the method ''addGraphic''.




!! XML Document Type Definition

----------


 &lt;!ELEMENT overlay (delete*, point*)&gt;
 
 &lt;!-- 
 	Delete from the overlay layer one or more points. If the atribute 'id' is present it's 
 	used as a regular expression to match point id to be deleted. If 'id' is not given 
 	deletes all points.
 --&gt;
 &lt;!ELEMENT delete EMPTY&gt;
 
 &lt;!--
 	Define a point with a given ID. If the ID exists it's moved to the new position
 	otherwise it is drawn on the map.
 	In order to redraw an existing point to change some attribute in the rendering
 	let include the attribute redraw="true" or a &lt;delete&gt; element. 
  --&gt;
 &lt;!ELEMENT point (ihtml?, symbol*, icon*, label*, linestring*, polygon*)&gt;
 
 &lt;!-- 
 	Insert arbitrary HTML in the point DIV.
 --&gt;
 &lt;!ELEMENT ihtml (#PCDATA)&gt;
 
 
 &lt;!ELEMENT symbol EMPTY&gt;
 &lt;!ELEMENT icon EMPTY&gt;


 &lt;!-- 
 	The content of the label element is the text of label.
 --&gt;
 &lt;!ELEMENT label (#PCDATA)&gt;

 &lt;!-- 
 	The content of the linestring element is a list of coordinates in the form:
 		x0 y0, x1 y1, [...], xn yn
 --&gt;
 &lt;!ELEMENT linestring EMPTY&gt;
 
 &lt;!-- 
 	The content of the polygon element is a list of coordinates in the form:
 		x0 y0, x1 y1, [...], xn yn
 --&gt;
 &lt;!ELEMENT polygon EMPTY&gt;
 
 &lt;!ATTLIST delete id CDATA #IMPLIED&gt;
 
 &lt;!ATTLIST point id CDATA #REQUIRED&gt;
 &lt;!ATTLIST point x CDATA #REQUIRED&gt;
 &lt;!ATTLIST point y CDATA #REQUIRED&gt;
 &lt;!ATTLIST point redraw (false|true) "false"&gt;
 
 &lt;!ATTLIST symbol shape CDATA #IMPLIED&gt;
 &lt;!ATTLIST symbol size CDATA #IMPLIED&gt;
 &lt;!ATTLIST symbol color CDATA #IMPLIED&gt;
 &lt;!ATTLIST symbol opacity CDATA #IMPLIED&gt;
 
 &lt;!ATTLIST icon src CDATA #REQUIRED&gt;
 &lt;!ATTLIST icon w CDATA #REQUIRED&gt;
 &lt;!ATTLIST icon h CDATA #REQUIRED&gt;
 &lt;!ATTLIST icon px CDATA #IMPLIED&gt;
 &lt;!ATTLIST icon py CDATA #IMPLIED&gt;
 &lt;!ATTLIST icon opacity CDATA #IMPLIED&gt;
 
 &lt;!ATTLIST label color CDATA #IMPLIED&gt;
 &lt;!ATTLIST label boxcolor CDATA #IMPLIED&gt;
 &lt;!ATTLIST label w CDATA #IMPLIED&gt;
 &lt;!ATTLIST label h CDATA #IMPLIED&gt;
 &lt;!ATTLIST label px CDATA #IMPLIED&gt;
 &lt;!ATTLIST label py CDATA #IMPLIED&gt;
 &lt;!ATTLIST label fsize CDATA #IMPLIED&gt;
 &lt;!ATTLIST label font CDATA #IMPLIED&gt;
 
 &lt;!ATTLIST linestring color CDATA #IMPLIED&gt;
 &lt;!ATTLIST linestring stroke CDATA #IMPLIED&gt;
 &lt;!ATTLIST linestring opacity CDATA #IMPLIED&gt;

 &lt;!ATTLIST polygon color CDATA #IMPLIED&gt;
 &lt;!ATTLIST polygon bcolor CDATA #IMPLIED&gt;
 &lt;!ATTLIST polygon stroke CDATA #IMPLIED&gt;
 &lt;!ATTLIST polygon opacity CDATA #IMPLIED&gt;

----------


! XML document example

----------
 TODO
----------

!! Overlay objects attributes

! POINT (&lt;point&gt;)
The POINT is the father of all objects you can display on the overlay layer.
Wherever you want dislay someting on the overlay layer you have to define a
POINT than add to the POINT icons, symbols, labels, etc.

__POINT attributes:__

;id: (string, mandatory) This string is used to identify the point. It's needed to translate, delete, redraw the POINT.
;x: (number, required) The X coordinate in map units.
;y: (number, required) The Y coordinate in map units.


! SYMBOL (kaXmlSymbol, &lt;symbol&gt;)
A symbol is a graphic element drawn at POINT coordinates. It's similar to an icon, but it has a parametric color and size.

__SYMBOL attributes:__

;shape: (string, optional) The shape of the symbol. Today implementation allow only the shape ''bullet''.
;color: (string, optional) The color of the symbol (HTML syntax).
;size: (integer, optional) The size in pixels of the symbol.
;opacity: (number, optional) 1.0 is opaque, 0.0 is fully transparent.


! ICON (kaXmlIcon, &lt;icon&gt;)
An icon drawn at POINT coordinates. The image is defined with an URL. Width and height of the image must be provided, because the icon will be centred at POINT coordinates.

__ICON attributes__

;src: (string, required) The relative or absolute URL of the image
;w: (integer, required) Width of the image in pixels
;h: (integer, required) Height of the image in pixels
;px: (integer, optional) Horizontal offset in pixels (positive to move the icon on the right).
;py: (integer, optional) Vertical offset in pixels (negative to rise the icon).
;opacity: (number, optional) 1.0 is opaque, 0.0 is fully transparent.

! LABEL (kaXmlLabel, &lt;label&gt;)
A text label is written near the POINT. POINT coordinates represent the top-left corner of the LABEL.

__LABEL attributes__ (Preliminary)

;color: (string, optional) Text color (HTML syntax).
;boxcolor: (string, optional) Background color behind the text (HTML syntax).
;w: (integer, optional) Width of the label in pixels.
;h: (integer, optional) Height of the label in pixels.
;px: (integer, optional) Horizontal offset in pixels (positive to move the label on the right).
;py: (integer, optional) Vertical offset in pixels (negative to rise the label).
;font: (string, optional) The text font (HTML syntax).
;fsize: (string, optional) Font size (HTML syntax).
;text: (string, required) The label text: this attribute is present only in JavaScript: in the XML syntax the text is the content of the &lt;label&gt; element.


! LINESTRING (kaXmlLinestring, &lt;linestring&gt;)
This element represent a geographic feature, a single line in geographic coordinates that will be scaled with the map.

__LINESTRING attributes__

;color: (string, optional) Line color (HTML syntax).
;stroke: (integer, optional) Line width in pixels.
;opacity: (number, optional) 1.0 is opaque, 0.0 is fully transparent.


! POLYGON (kaXmlPolygon, &lt;polygon&gt;)
This element represent a geographic feature, a single polygon in geographic coordinates that will be scaled with the map.

__POLYGON attributes__

;color: (string, optional) Surface color (HTML syntax).
;bcolor: (string, optional) Border color (HTML syntax).
;stroke: (integer, optional) Border width in pixels.
;opacity: (number, optional) 1.0 is opaque, 0.0 is fully transparent.

---------------------------------------------------

!!! FAQs

__Error: xmlDocument has no properties__

;: The XML is served with a wrong mime type by your web server. It should have a mime type "text/xml". Configure your server to associate ".xml" files with the correct mime, or, if you generate the XML dynamically, use a directive to set the mime type.



---------------------------------------------------

!!! TODOs
* Add a query capability for overlay points
* Evaluate the use of custom onclick or ondblclick events on points
* Add a tooltip for overlay points
* Make the label management smarter

 
 * END section in Wiki syntax
 *****************************************************************************/</span>

<span class="comment">/**
 * kaXmlOverlay( oKaMap, xml_url )
 *
 * oKaMap 	A kaMap object
 * zIndex	The z index of the layer
 */</span>
<span class="reserved">function</span> kaXmlOverlay( oKaMap, zIndex )
{
    kaTool.apply( <span class="reserved">this</span>, [oKaMap] );
    <span class="reserved">this</span>.name = <span class="literal">'kaXmlOverlay'</span>;

    <span class="reserved">for</span> (var p in kaTool.<span class="reserved">prototype</span>)
    {
        <span class="reserved">if</span> (!kaXmlOverlay.<span class="reserved">prototype</span>[p]) 
            kaXmlOverlay.<span class="reserved">prototype</span>[p]= kaTool.<span class="reserved">prototype</span>[p];
    }
    
    <span class="reserved">this</span>.browser = new _BrowserIdent();
    
    <span class="reserved">this</span>.urlBase = <span class="reserved">this</span>.kaMap.server;
    <span class="reserved">this</span>.urlBase += (<span class="reserved">this</span>.urlBase!=<span class="literal">''</span>&amp;&amp;<span class="reserved">this</span>.urlBase.substring(-1)!=<span class="literal">'/'</span>)?<span class="literal">''</span>:<span class="literal">'/'</span>;

	<span class="comment">// The list of overlay points</span>
	<span class="reserved">this</span>.ovrObjects = new Array();   
	
	<span class="comment">// The cavas of the overlay layer</span>
	<span class="reserved">this</span>.z_index = zIndex;
	<span class="reserved">this</span>.overlayCanvas = <span class="reserved">this</span>.kaMap.createDrawingCanvas( zIndex );
	
	<span class="comment">// Register for events</span>
    <span class="reserved">this</span>.kaMap.registerForEvent( KAMAP_SCALE_CHANGED, <span class="reserved">this</span>, <span class="reserved">this</span>.scaleChanged );
	
}

kaXmlOverlay.<span class="reserved">prototype</span>.scaleChanged = <span class="reserved">function</span>( eventID, mapName ) {
	<span class="reserved">if</span> (<span class="reserved">this</span>.ovrObjects == null) <span class="reserved">return</span>;
	<span class="reserved">for</span> (var i=0; i &lt; <span class="reserved">this</span>.ovrObjects.length; i++) {
		<span class="reserved">this</span>.ovrObjects[i].rescale();
	}
}

<span class="comment">/**
 * Remove the overlay layer and free resources user by overlay objects.
 */</span>
kaXmlOverlay.<span class="reserved">prototype</span>.remove = <span class="reserved">function</span>() {
    <span class="reserved">this</span>.kaMap.deregisterForEvent( KAMAP_SCALE_CHANGED, <span class="reserved">this</span>, <span class="reserved">this</span>.scaleChanged );
	<span class="reserved">this</span>.removePoint();
	<span class="reserved">this</span>.kaMap.removeDrawingCanvas(<span class="reserved">this</span>.overlayCanvas);
}

<span class="comment">/**
 * Load XML from the server and update the overlay.
 *
 * xml_url	URL of th XML with points to plot
 */</span>
kaXmlOverlay.<span class="reserved">prototype</span>.loadXml = <span class="reserved">function</span>(xml_url) {
    <span class="reserved">this</span>.urlBase = <span class="reserved">this</span>.kaMap.server;
    <span class="reserved">this</span>.urlBase += (<span class="reserved">this</span>.urlBase!=<span class="literal">''</span>&amp;&amp;<span class="reserved">this</span>.urlBase.substring(-1)!=<span class="literal">'/'</span>)?<span class="literal">''</span>:<span class="literal">'/'</span>;

	<span class="comment">// The URL of the XML</span>
	<span class="reserved">this</span>.xmlOvrUrl = <span class="reserved">this</span>.urlNormalize(xml_url);
	
	var xmlDocument = loadXMLDoc(<span class="reserved">this</span>.xmlOvrUrl);
	var objDomTree = xmlDocument.documentElement;
	
	var dels = objDomTree.getElementsByTagName(<span class="literal">"delete"</span>);
	<span class="reserved">for</span> (var i=0; i&lt;dels.length; i++) {
		<span class="comment">// read the id attribute</span>
		var a_id = dels[i].getAttributeNode(<span class="literal">"id"</span>);
		<span class="reserved">if</span> (a_id == null) {
			<span class="comment">// delete all points</span>
			<span class="reserved">this</span>.removePoint();
		} <span class="reserved">else</span> {
			<span class="reserved">this</span>.removePoint(a_id.value);
		}
	}
	
	var need_update = false;
		
	var points = objDomTree.getElementsByTagName(<span class="literal">"point"</span>);
	<span class="reserved">for</span> (var i=0; i&lt;points.length; i++) {
		<span class="comment">// read the mandatory attributes</span>
		var a_pid = points[i].getAttributeNode(<span class="literal">"id"</span>);
		<span class="reserved">if</span> (a_pid == null) {
			continue;
		}
		var pid = a_pid.value;
				
		var np = <span class="reserved">this</span>.getPointObject(pid);
		<span class="reserved">if</span> (np == null) {
			<span class="comment">// Create a new point</span>
			np = new kaXmlPoint(pid,<span class="reserved">this</span>);
			<span class="reserved">this</span>.ovrObjects.push(np);
		}

		np.parse(points[i]);
		need_update = true;
	}
	
	<span class="reserved">if</span> (need_update) <span class="reserved">this</span>.kaMap.updateObjects();
}

<span class="comment">/**
 * 
 */</span>
kaXmlOverlay.<span class="reserved">prototype</span>.urlNormalize = <span class="reserved">function</span>(url) {
	<span class="reserved">if</span> (url == null) <span class="reserved">return</span> <span class="literal">""</span>;
	<span class="reserved">if</span> (url.substring(1)!=<span class="literal">'/'</span>) {
		<span class="reserved">return</span> <span class="reserved">this</span>.urlBase+url;
	}
	<span class="reserved">return</span> url;
}
 
<span class="comment">/**
 * pid		Point ID
 * return The DIV object of the given point ID. null if not found.
 */</span>
kaXmlOverlay.<span class="reserved">prototype</span>.getDiv = <span class="reserved">function</span>(pid) {
	var div_id = <span class="reserved">this</span>.getDivId(pid);
	<span class="reserved">return</span> getRawObject(div_id);
}

<span class="comment">/**
 * pid		Point ID
 * return The kaXmlPoint object given the point ID. null if not found.
 */</span>
kaXmlOverlay.<span class="reserved">prototype</span>.getPointObject = <span class="reserved">function</span>(pid) {
	<span class="reserved">for</span> (var i=0; i &lt; <span class="reserved">this</span>.ovrObjects.length; i++) {
		<span class="reserved">if</span> (<span class="reserved">this</span>.ovrObjects[i] != null &amp;&amp; <span class="reserved">this</span>.ovrObjects[i].pid == pid) {
			<span class="reserved">return</span> <span class="reserved">this</span>.ovrObjects[i];
	 	}
	}
	<span class="reserved">return</span> null;
}

<span class="comment">/**
 * Instantiate a new kaXmlPoint adn add it to the overlay. If the PID
 * already exists it's deleted and recreated.
 *
 * pid		Point ID
 * x			X Coordinate
 * y			Y Coordinate
 * return A kaXmlPoint object with the given point ID.
 */</span>
kaXmlOverlay.<span class="reserved">prototype</span>.addNewPoint = <span class="reserved">function</span>(pid,x,y) {
	<span class="reserved">this</span>.removePoint(pid);
	var np = new kaXmlPoint(pid,<span class="reserved">this</span>);
	np.placeOnMap(x,y);
	<span class="reserved">this</span>.ovrObjects.push(np);
	<span class="reserved">return</span> np;
}

<span class="comment">/**
 * pid		Point ID
 * return the DIV id given the point ID
 */</span>
kaXmlOverlay.<span class="reserved">prototype</span>.getDivId = <span class="reserved">function</span>(pid) {
	<span class="reserved">return</span> <span class="literal">'xmlovr_'</span>+pid+<span class="literal">'_div'</span>;
}

<span class="comment">/**
 * Remove one or more point div from the map.
 * If pid is null or not present remove all points.
 *
 * pid		Point ID or a regexp 
 */</span>
kaXmlOverlay.<span class="reserved">prototype</span>.removePoint = <span class="reserved">function</span>( pid ) {

	<span class="reserved">if</span> ( (<span class="reserved">this</span>.removePoint.arguments.length &lt; 1) || (pid == null) ) {
		<span class="reserved">for</span> (var i=0; i &lt; <span class="reserved">this</span>.ovrObjects.length; i++) {
			<span class="reserved">if</span> (<span class="reserved">this</span>.ovrObjects[i] != null) {
				<span class="reserved">this</span>.ovrObjects[i].removeFromMap();
				delete <span class="reserved">this</span>.ovrObjects[i];
				<span class="reserved">this</span>.ovrObjects[i] = null;
			}
			delete <span class="reserved">this</span>.ovrObjects[i];
		}
		<span class="reserved">return</span>;
	}
	
	var re = new RegExp(pid);
	<span class="reserved">for</span> (var i=0; i &lt; <span class="reserved">this</span>.ovrObjects.length; i++) {
		<span class="reserved">if</span> (re.test(<span class="reserved">this</span>.ovrObjects[i].pid)) {
			<span class="reserved">if</span> (<span class="reserved">this</span>.ovrObjects[i] != null) {
				<span class="reserved">this</span>.ovrObjects[i].removeFromMap();
				delete <span class="reserved">this</span>.ovrObjects[i];
				<span class="reserved">this</span>.ovrObjects[i] = null;
			}
			delete <span class="reserved">this</span>.ovrObjects[i];
	 	}
	}
}
 
<span class="comment">/**
 * retrieve XML document as document object
 *
 * url		The XML URL
 * return 	The XML document object
 */</span>
<span class="reserved">function</span> loadXMLDoc(url) {
	<span class="comment">// XML document</span>
	var xDoc;
	var req;
	<span class="reserved">if</span> (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		req.open(<span class="literal">"GET"</span>, url, false);
		req.send(null);
	} <span class="reserved">else</span> <span class="reserved">if</span> (window.ActiveXObject) {
		req = new ActiveXObject(<span class="literal">"Microsoft.XMLHTTP"</span>);
		<span class="reserved">if</span> (req) {
			req.open(<span class="literal">"GET"</span>, url, false);
			req.send();
		}
	}
	<span class="reserved">if</span> (req) {
		<span class="reserved">if</span> (req.status == 200) {
			xDoc = req.responseXML;
			<span class="reserved">if</span> (xDoc &amp;&amp; typeof xDoc.childNodes != <span class="literal">"undefined"</span> &amp;&amp;
				xDoc.childNodes.length == 0) {
				xDoc = null;
			}
		} <span class="reserved">else</span> {
			alert(<span class="literal">"There was a problem retrieving the XML data:\n"</span> + req.statusText);
		}
	} <span class="reserved">else</span> {
		alert(<span class="literal">"Sorry, this browser isn't equipped to read XML data."</span>);
	}
	
	<span class="reserved">return</span> xDoc;
}



<span class="comment">/**
 * Base class for all graphics elements.
 */</span>
<span class="reserved">function</span> kaXmlGraphicElement() {}

<span class="comment">/**
 * Initialize the graphics element from an XML element
 *
 * point			The parent kaXmlPoint object
 * domElement	The XML DOM element that describe the graphic
 */</span>
kaXmlGraphicElement.<span class="reserved">prototype</span>.parseElement = <span class="reserved">function</span>(point, domElement) {}

<span class="comment">/**
 * Draw the graphics element
 *
 * point		The parent kaXmlPoint object
 */</span>
kaXmlGraphicElement.<span class="reserved">prototype</span>.draw = <span class="reserved">function</span>(point) {}

<span class="comment">/**
 * Draw the graphics element
 *
 * point		The parent kaXmlPoint object
 */</span>
kaXmlGraphicElement.<span class="reserved">prototype</span>.rescale = <span class="reserved">function</span>(point) {}


<span class="comment">/**
 * Construct a symbol 
 */</span>
<span class="reserved">function</span> kaXmlSymbol() {
	kaXmlGraphicElement.apply(<span class="reserved">this</span>);
    <span class="reserved">for</span> (var p in kaXmlGraphicElement.<span class="reserved">prototype</span>) {
        <span class="reserved">if</span> (!kaXmlSymbol.<span class="reserved">prototype</span>[p]) 
            kaXmlSymbol.<span class="reserved">prototype</span>[p]= kaXmlGraphicElement.<span class="reserved">prototype</span>[p];
    }
	
	<span class="reserved">this</span>.shape = <span class="literal">"bullet"</span>;
	<span class="reserved">this</span>.size = 10;
	<span class="reserved">this</span>.color = <span class="literal">"black"</span>;
}

kaXmlSymbol.<span class="reserved">prototype</span>.parseElement = <span class="reserved">function</span>(point, domElement) {
	<span class="reserved">this</span>.shape = domElement.getAttribute(<span class="literal">"shape"</span>);
	<span class="reserved">this</span>.size = parseInt(domElement.getAttribute(<span class="literal">"size"</span>));
	var c = domElement.getAttribute(<span class="literal">"color"</span>);
	<span class="reserved">if</span> (c != null) <span class="reserved">this</span>.color = c;
}

kaXmlSymbol.<span class="reserved">prototype</span>.draw = <span class="reserved">function</span>(point) {
	var jsgObject = new jsGraphics(point.divId); 
	with (jsgObject) {
		setColor(<span class="reserved">this</span>.color);
		var d = <span class="reserved">this</span>.size / 2;     
		fillEllipse(-d, -d, <span class="reserved">this</span>.size, <span class="reserved">this</span>.size);
		paint();
	}
}

<span class="comment">/**
 * Construct a geographic feature
 */</span>
<span class="reserved">function</span> kaXmlFeature( point ) {
	kaXmlGraphicElement.apply(<span class="reserved">this</span>);
    <span class="reserved">for</span> (var p in kaXmlGraphicElement.<span class="reserved">prototype</span>) {
        <span class="reserved">if</span> (!kaXmlFeature.<span class="reserved">prototype</span>[p]) 
            kaXmlFeature.<span class="reserved">prototype</span>[p]= kaXmlGraphicElement.<span class="reserved">prototype</span>[p];
    }
    
    <span class="reserved">this</span>.stroke = 1;
    <span class="reserved">this</span>.color = null;
    <span class="reserved">this</span>.bcolor = null;
    <span class="reserved">this</span>.opacity = 1;

	<span class="reserved">this</span>.cxmin = 0;
	<span class="reserved">this</span>.cymax = 0;
	<span class="reserved">this</span>.coords = <span class="literal">""</span>;
	<span class="reserved">this</span>.img = null;
	
	<span class="comment">// Calculate the min cellSize</span>
	var map = point.xml_overlay.kaMap.getCurrentMap();
	var scales = map.getScales();
	<span class="reserved">this</span>.maxScale = scales[scales.length - 1];
	<span class="reserved">this</span>.mcs = point.xml_overlay.kaMap.cellSize / point.xml_overlay.kaMap.getCurrentScale() * <span class="reserved">this</span>.maxScale;
}
	
kaXmlFeature.<span class="reserved">prototype</span>.parseElement = <span class="reserved">function</span>(point, domElement) {
	var t;
	t = parseInt(domElement.getAttribute(<span class="literal">"stroke"</span>));
	<span class="reserved">if</span> (! isNaN(t)) <span class="reserved">this</span>.stroke = t;
	t = domElement.getAttribute(<span class="literal">"color"</span>);
	<span class="reserved">if</span> (t != null) <span class="reserved">this</span>.color = t;
	t = domElement.getAttribute(<span class="literal">"bcolor"</span>);
	<span class="reserved">if</span> (t != null) <span class="reserved">this</span>.bcolor = t;
	t = parseFloat(domElement.getAttribute(<span class="literal">"opacity"</span>));
	<span class="reserved">if</span>(! isNaN(t)) <span class="reserved">this</span>.opacity = t; 
	
	var text = <span class="literal">""</span>;
	<span class="reserved">if</span> (domElement.firstChild != null) {
		text = domElement.firstChild.data;
		<span class="reserved">this</span>.readCoordinates(point, text)	;	
	}
}

kaXmlFeature.<span class="reserved">prototype</span>.readCoordinates = <span class="reserved">function</span>(point, text) {
	var cx = new Array();
	var cy = new Array();
	<span class="reserved">this</span>.cxmin = 0;
	<span class="reserved">this</span>.cymax = 0;
	<span class="reserved">this</span>.coords = <span class="literal">""</span>;
	var pp = text.split(<span class="literal">','</span>);
	var i;
	<span class="reserved">for</span> (i=0; i&lt;pp.length; i++) {
		var s = pp[i];
		var xy = s.match(/[-\+\d\.]+/g);
		<span class="reserved">if</span> (xy != null) {
			var x=parseFloat(xy[0]);
			var y=parseFloat(xy[1]);
			cx.push(x);
			cy.push(y);
			<span class="reserved">if</span> (i==0 || x&lt;<span class="reserved">this</span>.cxmin) <span class="reserved">this</span>.cxmin = x;
			<span class="reserved">if</span> (i==0 || y&gt;<span class="reserved">this</span>.cymax) <span class="reserved">this</span>.cymax = y;
		}
	}
	
	<span class="comment">// Normalize the coordinates</span>
	<span class="reserved">for</span> (i=0; i&lt;pp.length; i++) {
		var x = Math.round((cx[i] - <span class="reserved">this</span>.cxmin) / <span class="reserved">this</span>.mcs);
		var y = Math.round((<span class="reserved">this</span>.cymax - cy[i]) / <span class="reserved">this</span>.mcs);
		<span class="reserved">if</span> (i&gt;0) <span class="reserved">this</span>.coords += <span class="literal">","</span>;
			<span class="reserved">this</span>.coords += x+<span class="literal">","</span>+y;
	}
}

<span class="comment">/**
 * Construct a linestring 
 */</span>
<span class="reserved">function</span> kaXmlLinestring( point ) {
	kaXmlFeature.apply(<span class="reserved">this</span>, [point]);
    <span class="reserved">for</span> (var p in kaXmlFeature.<span class="reserved">prototype</span>) {
        <span class="reserved">if</span> (!kaXmlLinestring.<span class="reserved">prototype</span>[p]) 
            kaXmlLinestring.<span class="reserved">prototype</span>[p]= kaXmlFeature.<span class="reserved">prototype</span>[p];
    }
}

kaXmlLinestring.<span class="reserved">prototype</span>.draw = <span class="reserved">function</span>(point) {
	var xy = point.xml_overlay.kaMap.geoToPix( <span class="reserved">this</span>.cxmin, <span class="reserved">this</span>.cymax );
	var x0 = xy[0];
	var y0 = xy[1];
	
	xy = point.xml_overlay.kaMap.geoToPix( point.div.lon, point.div.lat );
	var xr = xy[0];
	var yr = xy[1];
	
	var border = 5;
	
	<span class="reserved">if</span> (<span class="reserved">this</span>.img == null) {
    		<span class="reserved">this</span>.img = document.createElement( <span class="literal">'img'</span> );
	    point.div.appendChild( <span class="reserved">this</span>.img );
	    <span class="reserved">this</span>.img.style.position = <span class="literal">'absolute'</span>;
	}
	
    <span class="reserved">this</span>.img.style.top = (y0 - yr - border)+<span class="literal">'px'</span>;
    <span class="reserved">this</span>.img.style.left = (x0 - xr - border)+<span class="literal">'px'</span>;
    var scf = point.xml_overlay.kaMap.getCurrentScale() / <span class="reserved">this</span>.maxScale;
    var it = point.xml_overlay.browser.getPreferredImageType();
    var u = <span class="literal">"drawgeom.php?gt=L&amp;st="</span>+<span class="reserved">this</span>.stroke+<span class="literal">"&amp;bp="</span>+border+<span class="literal">"&amp;sc="</span>+scf+<span class="literal">"&amp;cl="</span>+<span class="reserved">this</span>.coords;
    <span class="reserved">if</span> (<span class="reserved">this</span>.color != null) u += <span class="literal">"&amp;lc="</span>+escape(<span class="reserved">this</span>.color);
    <span class="reserved">if</span> (it == <span class="literal">"P"</span>) {
    		u += <span class="literal">"&amp;it=P"</span>;
    } <span class="reserved">else</span> {
    		u += <span class="literal">"&amp;it=G"</span>;
    }
    <span class="reserved">if</span> (point.xml_overlay.browser.getPreferredOpacity() == <span class="literal">"server"</span>) {
    		<span class="reserved">if</span> (<span class="reserved">this</span>.opacity &lt; 1) u += <span class="literal">"&amp;op="</span>+(<span class="reserved">this</span>.opacity*100);
    } <span class="reserved">else</span> {
    		<span class="reserved">if</span> (<span class="reserved">this</span>.opacity &lt; 1) point.xml_overlay.browser.setOpacity(<span class="reserved">this</span>.img, <span class="reserved">this</span>.opacity);
    }
    <span class="reserved">this</span>.img.src = u;
}

kaXmlLinestring.<span class="reserved">prototype</span>.rescale = <span class="reserved">function</span>(point) {
	<span class="reserved">this</span>.draw(point);
}

<span class="comment">/**
 * Construct a Polygon from the XML element
 */</span>
<span class="reserved">function</span> kaXmlPolygon( point ) {
	kaXmlFeature.apply(<span class="reserved">this</span>, [point]);
    <span class="reserved">for</span> (var p in kaXmlFeature.<span class="reserved">prototype</span>) {
        <span class="reserved">if</span> (!kaXmlPolygon.<span class="reserved">prototype</span>[p]) 
            kaXmlPolygon.<span class="reserved">prototype</span>[p]= kaXmlFeature.<span class="reserved">prototype</span>[p];
    }
}

kaXmlPolygon.<span class="reserved">prototype</span>.draw = <span class="reserved">function</span>(point) {
	var xy = point.xml_overlay.kaMap.geoToPix( <span class="reserved">this</span>.cxmin, <span class="reserved">this</span>.cymax );
	var x0 = xy[0];
	var y0 = xy[1];
	
	xy = point.xml_overlay.kaMap.geoToPix( point.div.lon, point.div.lat );
	var xr = xy[0];
	var yr = xy[1];
	
	var border = 5;
	
	<span class="reserved">if</span> (<span class="reserved">this</span>.img == null) {
    		<span class="reserved">this</span>.img = document.createElement( <span class="literal">'img'</span> );
	    <span class="reserved">this</span>.img.style.position = <span class="literal">'absolute'</span>;
	    point.div.appendChild( <span class="reserved">this</span>.img );
	}
	
    var scf = point.xml_overlay.kaMap.getCurrentScale() / <span class="reserved">this</span>.maxScale;
    var it = point.xml_overlay.browser.getPreferredImageType();
    var u = <span class="literal">"drawgeom.php?gt=P&amp;st="</span>+<span class="reserved">this</span>.stroke+<span class="literal">"&amp;bp="</span>+border+<span class="literal">"&amp;sc="</span>+scf+<span class="literal">"&amp;cl="</span>+<span class="reserved">this</span>.coords;
    <span class="reserved">if</span> (<span class="reserved">this</span>.color != null) u += <span class="literal">"&amp;fc="</span>+escape(<span class="reserved">this</span>.color);
    <span class="reserved">if</span> (<span class="reserved">this</span>.bcolor != null &amp;&amp; <span class="reserved">this</span>.bcolor != <span class="literal">""</span>) u += <span class="literal">"&amp;lc="</span>+escape(<span class="reserved">this</span>.bcolor);
    <span class="reserved">if</span> (it == <span class="literal">"P"</span>) {
    		u += <span class="literal">"&amp;it=P"</span>;
    } <span class="reserved">else</span> {
    		u += <span class="literal">"&amp;it=G"</span>;
    }
    <span class="reserved">if</span> (point.xml_overlay.browser.getPreferredOpacity() == <span class="literal">"server"</span>) {
    		<span class="reserved">if</span> (<span class="reserved">this</span>.opacity &lt; 1) u += <span class="literal">"&amp;op="</span>+(<span class="reserved">this</span>.opacity*100);
    } <span class="reserved">else</span> {
    		<span class="reserved">if</span> (<span class="reserved">this</span>.opacity &lt; 1) point.xml_overlay.browser.setOpacity(<span class="reserved">this</span>.img, <span class="reserved">this</span>.opacity);
    }
    
    <span class="reserved">this</span>.img.style.top = (y0 - yr - border)+<span class="literal">'px'</span>;
    <span class="reserved">this</span>.img.style.left = (x0 - xr - border)+<span class="literal">'px'</span>;
    
    <span class="reserved">this</span>.img.src = u;
}

kaXmlPolygon.<span class="reserved">prototype</span>.rescale = <span class="reserved">function</span>(point) {
	<span class="reserved">this</span>.draw(point);
}

<span class="comment">/**
 * Construct a label from the XML element
 */</span>
<span class="reserved">function</span> kaXmlLabel() {
	kaXmlGraphicElement.apply(<span class="reserved">this</span>);
    <span class="reserved">for</span> (var p in kaXmlGraphicElement.<span class="reserved">prototype</span>) {
        <span class="reserved">if</span> (!kaXmlLabel.<span class="reserved">prototype</span>[p]) 
            kaXmlLabel.<span class="reserved">prototype</span>[p]= kaXmlGraphicElement.<span class="reserved">prototype</span>[p];
    }
	
	<span class="reserved">this</span>.text = <span class="literal">""</span>;
	<span class="reserved">this</span>.color = <span class="literal">"black"</span>;
	<span class="reserved">this</span>.boxcolor = null;
	<span class="reserved">this</span>.w = 64;
	<span class="reserved">this</span>.h = 24;
	<span class="reserved">this</span>.xoff = 0;
	<span class="reserved">this</span>.yoff = 0;
	<span class="reserved">this</span>.fsize = <span class="literal">"10px"</span>;
	<span class="reserved">this</span>.font = <span class="literal">"Arial"</span>;
}

kaXmlLabel.<span class="reserved">prototype</span>.parseElement = <span class="reserved">function</span>(point, domElement) {
	<span class="reserved">if</span> (domElement.firstChild != null) {
		<span class="reserved">this</span>.text = domElement.firstChild.data;
	}

	var t;		
	t = domElement.getAttribute(<span class="literal">"color"</span>);
	<span class="reserved">if</span> (t != null) {
		<span class="reserved">this</span>.color = t;
	}
	<span class="reserved">this</span>.boxcolor = domElement.getAttribute(<span class="literal">"boxcolor"</span>);
	t = parseInt(domElement.getAttribute(<span class="literal">"w"</span>));
	<span class="reserved">if</span> (!isNaN(t)) {
		<span class="reserved">this</span>.w = t;
	}
	t = parseInt(domElement.getAttribute(<span class="literal">"h"</span>));
	<span class="reserved">if</span> (!isNaN(t)) {
		<span class="reserved">this</span>.h = t;
	}
	t = parseInt(domElement.getAttribute(<span class="literal">"px"</span>));
	<span class="reserved">if</span> (!isNaN(t)) {
		<span class="reserved">this</span>.xoff = t;
	}
	t = parseInt(domElement.getAttribute(<span class="literal">"py"</span>));
	<span class="reserved">if</span> (!isNaN(t)) {
		<span class="reserved">this</span>.yoff = t;
	}
	t = domElement.getAttribute(<span class="literal">"fsize"</span>);
	<span class="reserved">if</span> (t != null) {
		<span class="reserved">this</span>.fsize = t;
	}
	t = domElement.getAttribute(<span class="literal">"font"</span>);
	<span class="reserved">if</span> (t != null) {
		<span class="reserved">this</span>.font = t;
	}	
}

kaXmlLabel.<span class="reserved">prototype</span>.draw = <span class="reserved">function</span>(point) {
	var x = <span class="reserved">this</span>.xoff;
	var y = <span class="reserved">this</span>.yoff;
	
	var ldiv = document.createElement( <span class="literal">'div'</span> );
	ldiv.style.fontFamily = <span class="reserved">this</span>.font;
	ldiv.style.fontSize = <span class="reserved">this</span>.fsize;
	ldiv.style.textAlign = <span class="literal">'center'</span>;
	ldiv.style.color = <span class="reserved">this</span>.color;
    ldiv.style.left = x+<span class="literal">'px'</span>;
    ldiv.style.top = y+<span class="literal">'px'</span>;
	ldiv.style.position = <span class="literal">'absolute'</span>;
	<span class="reserved">if</span> (<span class="reserved">this</span>.boxcolor != null) ldiv.style.backgroundColor = <span class="reserved">this</span>.boxcolor;
	<span class="reserved">if</span> (<span class="reserved">this</span>.w&gt;0) ldiv.style.width = <span class="reserved">this</span>.w+<span class="literal">'px'</span>;
	<span class="reserved">else</span> ldiv.style.whiteSpace = <span class="literal">'nowrap'</span>;
	<span class="reserved">if</span> (<span class="reserved">this</span>.h&gt;0) ldiv.style.height = <span class="reserved">this</span>.h+<span class="literal">'px'</span>;
	
	var ltxt = document.createTextNode(<span class="reserved">this</span>.text);
	ldiv.appendChild( ltxt );
	
	point.div.appendChild( ldiv );
}

<span class="comment">/**
 * Construct an icon
 */</span>
<span class="reserved">function</span> kaXmlIcon() {
	kaXmlGraphicElement.apply(<span class="reserved">this</span>);
    <span class="reserved">for</span> (var p in kaXmlGraphicElement.<span class="reserved">prototype</span>) {
        <span class="reserved">if</span> (!kaXmlIcon.<span class="reserved">prototype</span>[p]) 
            kaXmlIcon.<span class="reserved">prototype</span>[p]= kaXmlGraphicElement.<span class="reserved">prototype</span>[p];
    }
    
	<span class="reserved">this</span>.icon_src = null;
	<span class="reserved">this</span>.icon_w = 0;
	<span class="reserved">this</span>.icon_h = 0;
	<span class="reserved">this</span>.xoff = 0;
	<span class="reserved">this</span>.yoff = 0;
}

kaXmlIcon.<span class="reserved">prototype</span>.parseElement = <span class="reserved">function</span>(point, domElement) {
	<span class="reserved">this</span>.icon_src = point.xml_overlay.urlNormalize(domElement.getAttribute(<span class="literal">"src"</span>));
	<span class="reserved">this</span>.icon_w = parseInt(domElement.getAttribute(<span class="literal">"w"</span>));
	<span class="reserved">this</span>.icon_h = parseInt(domElement.getAttribute(<span class="literal">"h"</span>));
	var t;
	t = parseInt(domElement.getAttribute(<span class="literal">"px"</span>));
	<span class="reserved">if</span> (!isNaN(t)) {
		<span class="reserved">this</span>.xoff = t;
	}
	t = parseInt(domElement.getAttribute(<span class="literal">"py"</span>));
	<span class="reserved">if</span> (!isNaN(t)) {
		<span class="reserved">this</span>.yoff = t;
	}
}

kaXmlIcon.<span class="reserved">prototype</span>.draw = <span class="reserved">function</span>(point) {
	var dx = -<span class="reserved">this</span>.icon_w / 2 + <span class="reserved">this</span>.xoff;     
	var dy = -<span class="reserved">this</span>.icon_h / 2 + <span class="reserved">this</span>.yoff;     
	
    var idiv = document.createElement( <span class="literal">'div'</span> );
    idiv.style.position = <span class="literal">'absolute'</span>;
    idiv.style.top = dy+<span class="literal">'px'</span>;
    idiv.style.left = dx+<span class="literal">'px'</span>;
    
    var img = document.createElement( <span class="literal">'img'</span> );
    img.src = <span class="reserved">this</span>.icon_src;
    img.width = <span class="reserved">this</span>.icon_w;
    img.height = <span class="reserved">this</span>.icon_h;
    
    idiv.appendChild( img );
    point.div.appendChild( idiv );
}

<span class="comment">/**
 * This object is a single point on the overlay.
 * The object hold the div and all the stuff to draw and move the point 
 * (symbol, label, icon, etc.).
 *
 * pid			The point ID (string)
 * xml_overlay	The kaXmlOverlay object owner of this point
 */</span>
<span class="reserved">function</span> kaXmlPoint(pid, xml_overlay) {
	<span class="reserved">this</span>.xml_overlay = xml_overlay;
	<span class="reserved">this</span>.pid = pid;
	<span class="reserved">this</span>.divId = <span class="reserved">this</span>.xml_overlay.getDivId(pid);
	<span class="reserved">this</span>.geox = 0;
	<span class="reserved">this</span>.geoy = 0;
	<span class="reserved">this</span>.shown = false;
	
	<span class="reserved">this</span>.graphics = new Array();
	
	<span class="reserved">this</span>.div = document.createElement(<span class="literal">'div'</span>);
	<span class="reserved">this</span>.div.setAttribute(<span class="literal">'id'</span>, <span class="reserved">this</span>.divId);
}

<span class="comment">/**
 * Show the point in the specified geo-position.
 */</span>
kaXmlPoint.<span class="reserved">prototype</span>.placeOnMap = <span class="reserved">function</span>( x, y ) {
	<span class="reserved">if</span> (!<span class="reserved">this</span>.shown) {
		<span class="reserved">this</span>.geox = x;
		<span class="reserved">this</span>.geoy = y;
		<span class="reserved">this</span>.xml_overlay.kaMap.addObjectGeo( <span class="reserved">this</span>.xml_overlay.overlayCanvas, x, y, <span class="reserved">this</span>.div );
		<span class="reserved">this</span>.shown = true;
	} 
}

<span class="comment">/**
 * Delete the point.
 */</span>
kaXmlPoint.<span class="reserved">prototype</span>.removeFromMap = <span class="reserved">function</span>( ) {
	<span class="reserved">if</span> (<span class="reserved">this</span>.shown) {
		<span class="reserved">this</span>.xml_overlay.kaMap.removeObject( <span class="reserved">this</span>.div );
		<span class="reserved">this</span>.shown = false;
	} 
}

<span class="comment">/**
 * Move the point in the specified geo-position.
 */</span>
kaXmlPoint.<span class="reserved">prototype</span>.setPosition = <span class="reserved">function</span>( x, y ) {
	<span class="reserved">if</span> (<span class="reserved">this</span>.shown) {
		<span class="reserved">this</span>.geox = x;
		<span class="reserved">this</span>.geoy = y;
		<span class="reserved">this</span>.div.lat = y;
		<span class="reserved">this</span>.div.lon = x;
	}
}

<span class="comment">/**
 * Add a new kaXmlGraphicElement to this kaXmlPoint.
 * kaXmlGraphicElement subclasses are:
 *  
 *  kaXmlSymbol
 *  kaXmlIcon
 *  kaXmlLabel
 *  kaXmlLinestring
 *  kaXmlPolygon
 *
 * obj	an object of class kaXmlGraphicElement
 */</span>
kaXmlPoint.<span class="reserved">prototype</span>.addGraphic = <span class="reserved">function</span>( obj ) {
		<span class="reserved">this</span>.graphics.push(obj);
		obj.draw(<span class="reserved">this</span>);
}

<span class="comment">/**
 * Clear all the graphic elements of this kaXmlPoint.
 */</span>
kaXmlPoint.<span class="reserved">prototype</span>.clear = <span class="reserved">function</span>() {
	<span class="reserved">this</span>.div.innerHTML = <span class="literal">""</span>;
	<span class="reserved">this</span>.graphics.length = 0;
	<span class="comment">//this.graphics = new Array();</span>
}

<span class="comment">/**
 * Set the HTML content of this kaXmlPoint.
 * This function delete any other content of the point.
 *
 * ihtml		A string containing the HTML
 */</span>
kaXmlPoint.<span class="reserved">prototype</span>.setInnerHtml = <span class="reserved">function</span>(ihtml) {
	<span class="reserved">this</span>.clear();
	<span class="reserved">this</span>.div.innerHTML = ihtml;
}

<span class="comment">/**
 * Parse the XML fragment describing the point. Then draw or translate
 * the point on the map.
 *
 * point_element	 A DOM element &lt;point&gt;
 */</span>
kaXmlPoint.<span class="reserved">prototype</span>.parse = <span class="reserved">function</span>(point_element) {

	var i;
	var x = parseFloat(point_element.getAttribute(<span class="literal">"x"</span>));
	var y = parseFloat(point_element.getAttribute(<span class="literal">"y"</span>));
	var redraw_a = point_element.getAttribute(<span class="literal">"redraw"</span>);
	var redraw = false;
	<span class="reserved">if</span> (redraw_a == <span class="literal">"true"</span>)	redraw = true;
			
	<span class="reserved">if</span> (!<span class="reserved">this</span>.shown) {
		<span class="reserved">this</span>.placeOnMap(x,y);
		<span class="reserved">this</span>.shown = true;
	} <span class="reserved">else</span> {
		<span class="reserved">this</span>.setPosition(x,y);
		
		<span class="comment">// Need redraw?</span>
		<span class="reserved">if</span> (!redraw) <span class="reserved">return</span>;
		
		<span class="comment">// clear and redraw the point</span>
		<span class="reserved">this</span>.clear();
	}
		
	<span class="comment">// look for ihtml element</span>
	var ihtml_element = point_element.getElementsByTagName(<span class="literal">"ihtml"</span>);
	<span class="reserved">for</span> (i=0; i&lt;ihtml_element.length; i++) {
		<span class="reserved">this</span>.div.innerHTML = ihtml_element[i].firstChild.nodeValue;
	}
	
	var t;
	var elements;
	
	<span class="comment">// look for symbol element</span>
	elements = point_element.getElementsByTagName(<span class="literal">"symbol"</span>);
	<span class="reserved">for</span> (i=0; i&lt;elements.length; i++) {
		t = new kaXmlSymbol();
		t.parseElement(<span class="reserved">this</span>, elements[i]);
		<span class="reserved">this</span>.addGraphic(t);
	}
	
	<span class="comment">// look for icon element</span>
	elements = point_element.getElementsByTagName(<span class="literal">"icon"</span>);
	<span class="reserved">for</span> (i=0; i&lt;elements.length; i++) {
		t = new kaXmlIcon();
		t.parseElement(<span class="reserved">this</span>, elements[i]);
		<span class="reserved">this</span>.addGraphic(t);
	}

	<span class="comment">// look for label element</span>
	elements = point_element.getElementsByTagName(<span class="literal">"label"</span>);
	<span class="reserved">for</span> (i=0; i&lt;elements.length; i++) {
		t = new kaXmlLabel();
		t.parseElement(<span class="reserved">this</span>, elements[i]);
		<span class="reserved">this</span>.addGraphic(t);
	}
	
	<span class="comment">// look for linestring element</span>
	elements = point_element.getElementsByTagName(<span class="literal">"linestring"</span>);
	<span class="reserved">for</span> (i=0; i&lt;elements.length; i++) {
		t = new kaXmlLinestring(<span class="reserved">this</span>);
		t.parseElement(<span class="reserved">this</span>, elements[i]);
		<span class="reserved">this</span>.addGraphic(t);
	}
	
	<span class="comment">// look for polygon element</span>
	elements = point_element.getElementsByTagName(<span class="literal">"polygon"</span>);
	<span class="reserved">for</span> (i=0; i&lt;elements.length; i++) {
		t = new kaXmlPolygon(<span class="reserved">this</span>);
		t.parseElement(<span class="reserved">this</span>, elements[i]);
		<span class="reserved">this</span>.addGraphic(t);
	}
}

kaXmlPoint.<span class="reserved">prototype</span>.rescale = <span class="reserved">function</span>(point_element) {
	<span class="reserved">for</span> (i=0; i&lt;<span class="reserved">this</span>.graphics.length; i++) {
		<span class="reserved">this</span>.graphics[i].rescale(<span class="reserved">this</span>);
	}
}

<span class="reserved">function</span> _BrowserIdent() {
	<span class="reserved">this</span>.detect = navigator.userAgent.toLowerCase();
	<span class="reserved">this</span>.OS = null;
	<span class="reserved">this</span>.browser = null;
	<span class="reserved">this</span>.version = null;
	<span class="reserved">this</span>.total = null;
	<span class="reserved">this</span>.thestring = null;
	<span class="reserved">this</span>.place = 0;


	<span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'konqueror'</span>)) {
		<span class="reserved">this</span>.browser = <span class="literal">"Konqueror"</span>;
		<span class="reserved">this</span>.OS = <span class="literal">"Linux"</span>;
	} <span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'safari'</span>)) <span class="reserved">this</span>.browser = <span class="literal">"Safari"</span>;
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'omniweb'</span>)) <span class="reserved">this</span>.browser = <span class="literal">"OmniWeb"</span>;
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'opera'</span>)) <span class="reserved">this</span>.browser = <span class="literal">"Opera"</span>
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'webtv'</span>)) <span class="reserved">this</span>.browser = <span class="literal">"WebTV"</span>;
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'icab'</span>)) <span class="reserved">this</span>.browser = <span class="literal">"iCab"</span>
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'msie'</span>)) <span class="reserved">this</span>.browser = <span class="literal">"Internet Explorer"</span>
	<span class="reserved">else</span> <span class="reserved">if</span> (!<span class="reserved">this</span>.checkIt(<span class="literal">'compatible'</span>)) {
		<span class="reserved">this</span>.browser = <span class="literal">"Netscape Navigator"</span>
		<span class="reserved">this</span>.version = <span class="reserved">this</span>.detect.charAt(8);
	} <span class="reserved">else</span> <span class="reserved">this</span>.browser = <span class="literal">"An unknown browser"</span>;

	<span class="reserved">if</span> (!<span class="reserved">this</span>.version) <span class="reserved">this</span>.version = <span class="reserved">this</span>.detect.charAt(<span class="reserved">this</span>.place + <span class="reserved">this</span>.thestring.length);

	<span class="reserved">if</span> (!<span class="reserved">this</span>.OS) {
		<span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'linux'</span>)) <span class="reserved">this</span>.OS = <span class="literal">"Linux"</span>;
		<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'x11'</span>)) <span class="reserved">this</span>.OS = <span class="literal">"Unix"</span>;
		<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'mac'</span>)) <span class="reserved">this</span>.OS = <span class="literal">"Mac"</span>;
		<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.checkIt(<span class="literal">'win'</span>)) <span class="reserved">this</span>.OS = <span class="literal">"Windows"</span>;
		<span class="reserved">else</span> <span class="reserved">this</span>.OS = <span class="literal">"an unknown operating system"</span>;
	}
}

_BrowserIdent.<span class="reserved">prototype</span>.checkIt = <span class="reserved">function</span> (string) {
	<span class="reserved">this</span>.place = <span class="reserved">this</span>.detect.indexOf(string) + 1;
	<span class="reserved">this</span>.thestring = string;
	<span class="reserved">return</span> <span class="reserved">this</span>.place;
}

_BrowserIdent.<span class="reserved">prototype</span>.setOpacity = <span class="reserved">function</span> (imageobject, opacity) {
	<span class="reserved">if</span> (opacity == undefined || <span class="reserved">this</span>.opacity &gt;= 1) <span class="reserved">return</span> <span class="literal">''</span>;
	<span class="reserved">if</span> (<span class="reserved">this</span>.browser == <span class="literal">"Netscape Navigator"</span>)
		imageobject.style.MozOpacity=opacity;
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.browser == <span class="literal">"Internet Explorer"</span> &amp;&amp; parseInt(<span class="reserved">this</span>.version)&gt;=4) {
		<span class="comment">//filter: alpha(opacity=50);</span>
		var tmp = imageobject.style.cssText;
		tmp = <span class="literal">"filter: alpha(opacity="</span>+(opacity*100)+<span class="literal">");"</span> + tmp;
		imageobject.style.cssText = tmp;
	} <span class="reserved">else</span> {
		var tmp = imageobject.style.cssText;
		tmp = <span class="literal">"opacity: "</span>+opacity+<span class="literal">";"</span> + tmp;	
		imageobject.style.cssText = tmp;
	}
}

_BrowserIdent.<span class="reserved">prototype</span>.getPreferredImageType = <span class="reserved">function</span> () {
	<span class="reserved">if</span> (<span class="reserved">this</span>.browser == <span class="literal">"Netscape Navigator"</span>) <span class="reserved">return</span> <span class="literal">"P"</span>;
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.browser == <span class="literal">"Opera"</span>) <span class="reserved">return</span> <span class="literal">"P"</span>;
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.browser == <span class="literal">"Safari"</span>) <span class="reserved">return</span> <span class="literal">"P"</span>;
	<span class="reserved">else</span> <span class="reserved">return</span> <span class="literal">"G"</span>
}

_BrowserIdent.<span class="reserved">prototype</span>.getPreferredOpacity = <span class="reserved">function</span> () {
	<span class="reserved">if</span> (<span class="reserved">this</span>.browser == <span class="literal">"Netscape Navigator"</span>) <span class="reserved">return</span> <span class="literal">"server"</span>;
	<span class="reserved">else</span> <span class="reserved">if</span> (<span class="reserved">this</span>.browser == <span class="literal">"Opera"</span>) <span class="reserved">return</span> <span class="literal">"server"</span>;
	<span class="reserved">else</span> <span class="reserved">return</span> <span class="literal">"client"</span>
}
</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b>ka-Map</b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Wed Mar 15 10:50:59 2006</div>
</body>
</html>

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us