Project

General

Profile

1 4307 leinfelder
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<TITLE>
6
Extent
7
</TITLE>
8
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
9
</HEAD>
10
<SCRIPT>
11
function asd()
12
{
13
parent.document.title="Extent";
14
}
15
</SCRIPT>
16
<BODY BGCOLOR="white" onload="asd();">
17
18
<!-- ========== START OF NAVBAR ========== -->
19
<A NAME="navbar_bottom"><!-- --></A>
20
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
21
<TR>
22
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
23
<A NAME="navbar_bottom_firstrow"><!-- --></A>
24
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
25
  <TR ALIGN="center" VALIGN="top">
26
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
27
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">  <A HREF="overview-summary-Extent.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A>&nbsp;</TD>
28
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">&nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
29
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
30
  <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
31
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
32
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
33
  </TR>
34
</TABLE>
35
</TD>
36
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
37
<B><a href='http://mapbuilder.sourceforge.net'>Community Map Builder</a> 27 Apr 2008</B>
38
</EM>
39
</TD
40
</TR>
41
42
<TR>
43
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
44
&nbsp;<A HREF="EventLog.html"><B>PREV CLASS</B></A><!--
45
   NEXT CLASS
46
-->
47
&nbsp;<A HREF="FeatureCollection.html"><B>NEXT CLASS</B></A></FONT></TD>
48
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
49
  <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
50
&nbsp;<A HREF="Extent.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
51
&nbsp;
52
<SCRIPT>
53
  <!--
54
  if(window==top) {
55
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
56
  }
57
  //-->
58
</SCRIPT>
59
<NOSCRIPT>
60
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
61
</NOSCRIPT>
62
</FONT></TD>
63
</TR>
64
<TR>
65
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
66
  SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
67
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
68
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
69
</TR>
70
</TABLE>
71
<!-- =========== END OF NAVBAR =========== -->
72
<HR>
73
74
<!-- ======== START OF CLASS DATA ======== -->
75
<H2>Class Extent</H2>
76
<PRE>Object
77
   |
78
   +--<b>Extent</b>
79
</PRE>
80
81
82
<HR>
83
<DL>
84
   <!-- Class definition -->
85
   <DT>class
86
   <B>Extent</B>
87
88
89
</DL>
90
91
   <P>
92
   <I>Defined in <a href='overview-summary-Extent.js.html'>Extent.js</a></I><BR/><BR/>
93
   </P>
94
95
   <HR>
96
97
<!-- ======== NESTED CLASS SUMMARY ======== -->
98
99
<!-- ======== END NESTED CLASS SUMMARY ======== -->
100
101
102
<!-- =========== FIELD SUMMARY =========== -->
103
104
   <A NAME="field_summary"><!-- --></A>
105
      <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
106
         <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
107
            <TD COLSPAN=2><FONT SIZE="+2">
108
               <B>Field Summary</B></FONT></TD>
109
         </TR>
110
111
   <!-- This is one instance field summary -->
112
113
   <TR BGCOLOR="white" CLASS="TableRowColor">
114
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
115
   <CODE>&nbsp;Object</CODE></FONT></TD>
116
   <TD><CODE><B><A HREF="#fixedScale">fixedScale</A></B></CODE>
117
   <BR>
118
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
119
   </TR>
120
121
   <TR BGCOLOR="white" CLASS="TableRowColor">
122
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
123
   <CODE>&nbsp;Object</CODE></FONT></TD>
124
   <TD><CODE><B><A HREF="#height">height</A></B></CODE>
125
   <BR>
126
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
127
   </TR>
128
129
   <TR BGCOLOR="white" CLASS="TableRowColor">
130
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
131
   <CODE>&nbsp;Object</CODE></FONT></TD>
132
   <TD><CODE><B><A HREF="#id">id</A></B></CODE>
133
   <BR>
134
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
135
   </TR>
136
137
   <TR BGCOLOR="white" CLASS="TableRowColor">
138
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139
   <CODE>&nbsp;Object</CODE></FONT></TD>
140
   <TD><CODE><B><A HREF="#lr">lr</A></B></CODE>
141
   <BR>
142
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
143
   </TR>
144
145
   <TR BGCOLOR="white" CLASS="TableRowColor">
146
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
147
   <CODE>&nbsp;Object</CODE></FONT></TD>
148
   <TD><CODE><B><A HREF="#model">model</A></B></CODE>
149
   <BR>
150
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
151
   </TR>
152
153
   <TR BGCOLOR="white" CLASS="TableRowColor">
154
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155
   <CODE>&nbsp;Object</CODE></FONT></TD>
156
   <TD><CODE><B><A HREF="#size">size</A></B></CODE>
157
   <BR>
158
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
159
   </TR>
160
161
   <TR BGCOLOR="white" CLASS="TableRowColor">
162
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163
   <CODE>&nbsp;Object</CODE></FONT></TD>
164
   <TD><CODE><B><A HREF="#ul">ul</A></B></CODE>
165
   <BR>
166
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
167
   </TR>
168
169
   <TR BGCOLOR="white" CLASS="TableRowColor">
170
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171
   <CODE>&nbsp;Object</CODE></FONT></TD>
172
   <TD><CODE><B><A HREF="#width">width</A></B></CODE>
173
   <BR>
174
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
175
   </TR>
176
177
   <TR BGCOLOR="white" CLASS="TableRowColor">
178
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179
   <CODE>&nbsp;Object</CODE></FONT></TD>
180
   <TD><CODE><B><A HREF="#zoomBy">zoomBy</A></B></CODE>
181
   <BR>
182
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
183
   </TR>
184
185
186
   </TABLE>
187
   &nbsp;
188
189
190
191
192
<!-- =========== END FIELD SUMMARY =========== -->
193
194
195
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
196
197
<A NAME="constructor_summary"><!-- --></A>
198
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
199
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
200
<TD COLSPAN=2><FONT SIZE="+2">
201
<B>Constructor Summary</B></FONT></TD>
202
</TR>
203
<TR BGCOLOR="white" CLASS="TableRowColor">
204
   <TD>
205
      <CODE>
206
	 <B>
207
	    <A HREF="Extent.html#Extent()">Extent</A>
208
	 </B>
209
	 ( model, initialRes )
210
      </CODE>
211
      <BR>
212
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
213
      A tool designed to handle geography calculations for widgets which render
214
 the model in 2D.
215
      </TD>
216
</TR>
217
</TABLE>
218
219
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
220
221
&nbsp;
222
223
<!-- ========== METHOD SUMMARY =========== -->
224
225
<A NAME="method_summary"><!-- --></A>
226
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
227
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
228
<TD COLSPAN=2><FONT SIZE="+2">
229
<B>Method Summary</B></FONT></TD>
230
</TR>
231
232
233
   <TR BGCOLOR="white" CLASS="TableRowColor">
234
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
235
	 <FONT SIZE="-1">
236
	    <CODE>&nbsp;Object</CODE>
237
	 </FONT>
238
      </TD>
239
      <TD>
240
	 <CODE>
241
	    <B>
242
	       <A HREF="#centerAt">centerAt</A></B>(center, newres, limitExtent)
243
	 </CODE>
244
	 <BR>
245
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
246
	 Adjust the extent so that it is centered at given XY coordinate with given
247
 resolution.
248
      </TD>
249
   </TR>
250
251
   <TR BGCOLOR="white" CLASS="TableRowColor">
252
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
253
	 <FONT SIZE="-1">
254
	    <CODE>&nbsp;void</CODE>
255
	 </FONT>
256
      </TD>
257
      <TD>
258
	 <CODE>
259
	    <B>
260
	       <A HREF="#checkBbox">checkBbox</A></B>()
261
	 </CODE>
262
	 <BR>
263
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
264
265
      </TD>
266
   </TR>
267
268
   <TR BGCOLOR="white" CLASS="TableRowColor">
269
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
270
	 <FONT SIZE="-1">
271
	    <CODE>&nbsp;void</CODE>
272
	 </FONT>
273
      </TD>
274
      <TD>
275
	 <CODE>
276
	    <B>
277
	       <A HREF="#firstInit">firstInit</A></B>(extent, initialRes)
278
	 </CODE>
279
	 <BR>
280
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
281
282
      </TD>
283
   </TR>
284
285
   <TR BGCOLOR="white" CLASS="TableRowColor">
286
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
287
	 <FONT SIZE="-1">
288
	    <CODE>&nbsp;Object</CODE>
289
	 </FONT>
290
      </TD>
291
      <TD>
292
	 <CODE>
293
	    <B>
294
	       <A HREF="#getBbox">getBbox</A></B>()
295
	 </CODE>
296
	 <BR>
297
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
298
	 Returns the bounding box as stored in the model
299
      </TD>
300
   </TR>
301
302
   <TR BGCOLOR="white" CLASS="TableRowColor">
303
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
304
	 <FONT SIZE="-1">
305
	    <CODE>&nbsp;Object</CODE>
306
	 </FONT>
307
      </TD>
308
      <TD>
309
	 <CODE>
310
	    <B>
311
	       <A HREF="#getCenter">getCenter</A></B>()
312
	 </CODE>
313
	 <BR>
314
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
315
	 Returns the XY center of this extent
316
      </TD>
317
   </TR>
318
319
   <TR BGCOLOR="white" CLASS="TableRowColor">
320
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
321
	 <FONT SIZE="-1">
322
	    <CODE>&nbsp;Object</CODE>
323
	 </FONT>
324
      </TD>
325
      <TD>
326
	 <CODE>
327
	    <B>
328
	       <A HREF="#getFixedScale">getFixedScale</A></B>(res)
329
	 </CODE>
330
	 <BR>
331
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
332
	 When given a res, it recalculates it to match the zoomlevels, when present and returns a fixed scale.
333
      </TD>
334
   </TR>
335
336
   <TR BGCOLOR="white" CLASS="TableRowColor">
337
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
338
	 <FONT SIZE="-1">
339
	    <CODE>&nbsp;Object</CODE>
340
	 </FONT>
341
      </TD>
342
      <TD>
343
	 <CODE>
344
	    <B>
345
	       <A HREF="#getPL">getPL</A></B>(xy)
346
	 </CODE>
347
	 <BR>
348
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
349
	 Returns pixel/line coordinates for given XY projection coords
350
      </TD>
351
   </TR>
352
353
   <TR BGCOLOR="white" CLASS="TableRowColor">
354
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
355
	 <FONT SIZE="-1">
356
	    <CODE>&nbsp;Object</CODE>
357
	 </FONT>
358
      </TD>
359
      <TD>
360
	 <CODE>
361
	    <B>
362
	       <A HREF="#getScale">getScale</A></B>()
363
	 </CODE>
364
	 <BR>
365
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
366
	 Returns the map scale denominator for the current extent resolution
367
      </TD>
368
   </TR>
369
370
   <TR BGCOLOR="white" CLASS="TableRowColor">
371
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
372
	 <FONT SIZE="-1">
373
	    <CODE>&nbsp;Object</CODE>
374
	 </FONT>
375
      </TD>
376
      <TD>
377
	 <CODE>
378
	    <B>
379
	       <A HREF="#getSize">getSize</A></B>()
380
	 </CODE>
381
	 <BR>
382
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
383
	 Returns the window size as stored in the model
384
      </TD>
385
   </TR>
386
387
   <TR BGCOLOR="white" CLASS="TableRowColor">
388
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
389
	 <FONT SIZE="-1">
390
	    <CODE>&nbsp;Object</CODE>
391
	 </FONT>
392
      </TD>
393
      <TD>
394
	 <CODE>
395
	    <B>
396
	       <A HREF="#getXY">getXY</A></B>(pl)
397
	 </CODE>
398
	 <BR>
399
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
400
	 Returns XY coordinates for given pixel line coords w.r.t.
401
      </TD>
402
   </TR>
403
404
   <TR BGCOLOR="white" CLASS="TableRowColor">
405
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
406
	 <FONT SIZE="-1">
407
	    <CODE>&nbsp;void</CODE>
408
	 </FONT>
409
      </TD>
410
      <TD>
411
	 <CODE>
412
	    <B>
413
	       <A HREF="#init">init</A></B>(extent, initialRes)
414
	 </CODE>
415
	 <BR>
416
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
417
	 Initialization of the Extent tool, called as a loadModel event listener.
418
      </TD>
419
   </TR>
420
421
   <TR BGCOLOR="white" CLASS="TableRowColor">
422
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
423
	 <FONT SIZE="-1">
424
	    <CODE>&nbsp;void</CODE>
425
	 </FONT>
426
      </TD>
427
      <TD>
428
	 <CODE>
429
	    <B>
430
	       <A HREF="#setBbox">setBbox</A></B>(bbox)
431
	 </CODE>
432
	 <BR>
433
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
434
	 Recalculates a given bbox and stores a proper aspect one in the model
435
      </TD>
436
   </TR>
437
438
   <TR BGCOLOR="white" CLASS="TableRowColor">
439
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
440
	 <FONT SIZE="-1">
441
	    <CODE>&nbsp;void</CODE>
442
	 </FONT>
443
      </TD>
444
      <TD>
445
	 <CODE>
446
	    <B>
447
	       <A HREF="#setResolution">setResolution</A></B>(size)
448
	 </CODE>
449
	 <BR>
450
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
451
	 Adjust the resolution so the bbox fits in the specified width and height
452
      </TD>
453
   </TR>
454
455
   <TR BGCOLOR="white" CLASS="TableRowColor">
456
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
457
	 <FONT SIZE="-1">
458
	    <CODE>&nbsp;void</CODE>
459
	 </FONT>
460
      </TD>
461
      <TD>
462
	 <CODE>
463
	    <B>
464
	       <A HREF="#setScale">setScale</A></B>(scale)
465
	 </CODE>
466
	 <BR>
467
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
468
	 Sets the model's resolution from mapScale input value.
469
      </TD>
470
   </TR>
471
472
   <TR BGCOLOR="white" CLASS="TableRowColor">
473
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
474
	 <FONT SIZE="-1">
475
	    <CODE>&nbsp;void</CODE>
476
	 </FONT>
477
      </TD>
478
      <TD>
479
	 <CODE>
480
	    <B>
481
	       <A HREF="#setSize">setSize</A></B>(size)
482
	 </CODE>
483
	 <BR>
484
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
485
	 Stores a given window size in the model.
486
      </TD>
487
   </TR>
488
489
   <TR BGCOLOR="white" CLASS="TableRowColor">
490
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
491
	 <FONT SIZE="-1">
492
	    <CODE>&nbsp;void</CODE>
493
	 </FONT>
494
      </TD>
495
      <TD>
496
	 <CODE>
497
	    <B>
498
	       <A HREF="#setZoomLevels">setZoomLevels</A></B>(enabled,zoomLevels)
499
	 </CODE>
500
	 <BR>
501
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
502
503
      </TD>
504
   </TR>
505
506
   <TR BGCOLOR="white" CLASS="TableRowColor">
507
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
508
	 <FONT SIZE="-1">
509
	    <CODE>&nbsp;void</CODE>
510
	 </FONT>
511
      </TD>
512
      <TD>
513
	 <CODE>
514
	    <B>
515
	       <A HREF="#zoomToBox">zoomToBox</A></B>(ul, lr)
516
	 </CODE>
517
	 <BR>
518
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
519
	 Adjust the extent to the given bbox.
520
      </TD>
521
   </TR>
522
523
524
</TABLE>
525
526
527
528
<P>
529
<!-- ========== END METHOD SUMMARY =========== -->
530
531
532
<!-- ============ FIELD DETAIL START =========== -->
533
534
   <A NAME="field_detail"><!-- --></A>
535
   <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
536
      <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
537
         <TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD>
538
      </TR>
539
   </TABLE>
540
541
542
   <A NAME="fixedScale"><!-- --></A>
543
   <H3>fixedScale</H3>
544
   <PRE>Object&nbsp;<B>fixedScale</B></PRE>
545
   <UL>
546
547
548
   </UL>
549
   <HR>
550
551
   <A NAME="height"><!-- --></A>
552
   <H3>height</H3>
553
   <PRE>Object&nbsp;<B>height</B></PRE>
554
   <UL>
555
556
557
   </UL>
558
   <HR>
559
560
   <A NAME="id"><!-- --></A>
561
   <H3>id</H3>
562
   <PRE>Object&nbsp;<B>id</B></PRE>
563
   <UL>
564
565
566
   </UL>
567
   <HR>
568
569
   <A NAME="lr"><!-- --></A>
570
   <H3>lr</H3>
571
   <PRE>Object&nbsp;<B>lr</B></PRE>
572
   <UL>
573
574
575
   </UL>
576
   <HR>
577
578
   <A NAME="model"><!-- --></A>
579
   <H3>model</H3>
580
   <PRE>Object&nbsp;<B>model</B></PRE>
581
   <UL>
582
583
584
   </UL>
585
   <HR>
586
587
   <A NAME="size"><!-- --></A>
588
   <H3>size</H3>
589
   <PRE>Object&nbsp;<B>size</B></PRE>
590
   <UL>
591
592
593
   </UL>
594
   <HR>
595
596
   <A NAME="ul"><!-- --></A>
597
   <H3>ul</H3>
598
   <PRE>Object&nbsp;<B>ul</B></PRE>
599
   <UL>
600
601
602
   </UL>
603
   <HR>
604
605
   <A NAME="width"><!-- --></A>
606
   <H3>width</H3>
607
   <PRE>Object&nbsp;<B>width</B></PRE>
608
   <UL>
609
610
611
   </UL>
612
   <HR>
613
614
   <A NAME="zoomBy"><!-- --></A>
615
   <H3>zoomBy</H3>
616
   <PRE>Object&nbsp;<B>zoomBy</B></PRE>
617
   <UL>
618
619
620
   </UL>
621
   <HR>
622
623
624
625
<!-- ============ FIELD DETAIL END =========== -->
626
627
    <!-- ========= CONSTRUCTOR DETAIL START ======== -->
628
629
<A NAME="constructor_detail"><!-- --></A>
630
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
631
   <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
632
      <TD COLSPAN=1>
633
      <FONT SIZE="+2"><B>Constructor Detail</B></FONT>
634
      </TD>
635
   </TR>
636
</TABLE>
637
638
<A NAME="Extent()"><!-- --></A><H3>
639
Extent</H3>
640
<PRE><B>Extent</B>( model, initialRes )</PRE>
641
642
643
<UL>
644
   A tool designed to handle geography calculations for widgets which render
645
 the model in 2D.
646
 Use of this tool requires that it's model implements get/setWindowHeight/Width
647
 methods.
648
 Encapsulates all geography and image size aspects of a geographic object
649
 displayed in a rectangular area on the screen.
650
 All coordinates are handled as points which is a 2 element array, where x is
651
 the first element and y is the second. Coordinates are either pixel and lixel
652
 (pl) relative to the top left of the extent or projection XY values (xy).
653
</UL>
654
655
656
657
   <UL>
658
   <B>Parameters:</B>
659
660
     <UL><CODE>model</CODE> -        the model document that this extent represents
661
     </UL>
662
663
     <UL><CODE>initialRes</CODE> -   (optional) if supplied the extent resolution will be set to this value
664
     </UL>
665
666
667
   </UL>
668
669
670
<!-- Constructor return value(s) -->
671
672
<!-- End constructor return value(s) -->
673
674
<!-- ADDITIONAL ATTRIBUTES -->
675
676
<HR/>
677
<!-- END ADDITIONAL ATTRIBUTES  -->
678
679
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
680
681
682
<!-- ============ METHOD DETAIL START ========== -->
683
684
<A NAME="method_detail"><!-- --></A>
685
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
686
   <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
687
      <TD COLSPAN=1><FONT SIZE="+2">
688
         <B>Method Detail</B></FONT>
689
      </TD>
690
   </TR>
691
</TABLE>
692
693
<!-- One single method detail entry -->
694
695
   <A NAME="centerAt"><!-- --></A>
696
   <H3>centerAt</H3>
697
   <PRE>Object <B>centerAt</B>(center, newres, limitExtent)</PRE>
698
699
      <UL>Adjust the extent so that it is centered at given XY coordinate with given
700
 resolution.  Extent width and height remain fixed.  Optionally check to
701
 ensure that it doesn't go beyond available extent.</UL>
702
703
704
   <!-- METHOD PARAMETERS START -->
705
706
   <UL>
707
   <B>Parameters:</B>
708
709
     <UL><CODE>center</CODE> -       projection XY coordinate to center at
710
      </UL>
711
712
     <UL><CODE>newres</CODE> -       resolution to display at
713
      </UL>
714
715
     <UL><CODE>limitExtent</CODE> -  ensure that the extent doesn't go beyond available bbox (TBD: not complete/tested)
716
      </UL>
717
718
   </UL>
719
720
   <!-- METHOD PARAMETERS END -->
721
722
723
   <UL>
724
   <B>Returns:</B>
725
        <UL>
726
        none
727
        </UL>
728
   </UL>
729
730
731
   <!-- ADDITIONAL ATTRIBUTES START -->
732
733
   <!-- ADDITIONAL ATTRIBUTES  END -->
734
<HR>
735
736
   <A NAME="checkBbox"><!-- --></A>
737
   <H3>checkBbox</H3>
738
   <PRE>void <B>checkBbox</B>()</PRE>
739
740
741
   <!-- METHOD PARAMETERS START -->
742
743
   <!-- METHOD PARAMETERS END -->
744
745
746
747
   <!-- ADDITIONAL ATTRIBUTES START -->
748
749
   <!-- ADDITIONAL ATTRIBUTES  END -->
750
<HR>
751
752
   <A NAME="firstInit"><!-- --></A>
753
   <H3>firstInit</H3>
754
   <PRE>void <B>firstInit</B>(extent, initialRes)</PRE>
755
756
757
   <!-- METHOD PARAMETERS START -->
758
759
   <!-- METHOD PARAMETERS END -->
760
761
762
763
   <!-- ADDITIONAL ATTRIBUTES START -->
764
765
   <!-- ADDITIONAL ATTRIBUTES  END -->
766
<HR>
767
768
   <A NAME="getBbox"><!-- --></A>
769
   <H3>getBbox</H3>
770
   <PRE>Object <B>getBbox</B>()</PRE>
771
772
      <UL>Returns the bounding box as stored in the model</UL>
773
774
775
   <!-- METHOD PARAMETERS START -->
776
777
   <!-- METHOD PARAMETERS END -->
778
779
780
   <UL>
781
   <B>Returns:</B>
782
        <UL>
783
        array with the bounding box
784
        </UL>
785
   </UL>
786
787
788
   <!-- ADDITIONAL ATTRIBUTES START -->
789
790
   <!-- ADDITIONAL ATTRIBUTES  END -->
791
<HR>
792
793
   <A NAME="getCenter"><!-- --></A>
794
   <H3>getCenter</H3>
795
   <PRE>Object <B>getCenter</B>()</PRE>
796
797
      <UL>Returns the XY center of this extent</UL>
798
799
800
   <!-- METHOD PARAMETERS START -->
801
802
   <!-- METHOD PARAMETERS END -->
803
804
805
   <UL>
806
   <B>Returns:</B>
807
        <UL>
808
        array of XY for th center of the extent
809
        </UL>
810
   </UL>
811
812
813
   <!-- ADDITIONAL ATTRIBUTES START -->
814
815
   <!-- ADDITIONAL ATTRIBUTES  END -->
816
<HR>
817
818
   <A NAME="getFixedScale"><!-- --></A>
819
   <H3>getFixedScale</H3>
820
   <PRE>Object <B>getFixedScale</B>(res)</PRE>
821
822
      <UL>When given a res, it recalculates it to match the zoomlevels, when present and returns a fixed scale.
823
 When no res is given it returns the maximum resolution</UL>
824
825
826
   <!-- METHOD PARAMETERS START -->
827
828
   <UL>
829
   <B>Parameters:</B>
830
831
     <UL><CODE>res</CODE> -  optional resolution to be checked
832
      </UL>
833
834
   </UL>
835
836
   <!-- METHOD PARAMETERS END -->
837
838
839
   <UL>
840
   <B>Returns:</B>
841
        <UL>
842
        fixedScale the resolution to display the map with
843
        </UL>
844
   </UL>
845
846
847
   <!-- ADDITIONAL ATTRIBUTES START -->
848
849
   <!-- ADDITIONAL ATTRIBUTES  END -->
850
<HR>
851
852
   <A NAME="getPL"><!-- --></A>
853
   <H3>getPL</H3>
854
   <PRE>Object <B>getPL</B>(xy)</PRE>
855
856
      <UL>Returns pixel/line coordinates for given XY projection coords</UL>
857
858
859
   <!-- METHOD PARAMETERS START -->
860
861
   <UL>
862
   <B>Parameters:</B>
863
864
     <UL><CODE>xy</CODE> -    projection XY coordinate to calculate
865
      </UL>
866
867
   </UL>
868
869
   <!-- METHOD PARAMETERS END -->
870
871
872
   <UL>
873
   <B>Returns:</B>
874
        <UL>
875
        point array of pxiel/line coordinates w.r.t. top left corner
876
        </UL>
877
   </UL>
878
879
880
   <!-- ADDITIONAL ATTRIBUTES START -->
881
882
   <!-- ADDITIONAL ATTRIBUTES  END -->
883
<HR>
884
885
   <A NAME="getScale"><!-- --></A>
886
   <H3>getScale</H3>
887
   <PRE>Object <B>getScale</B>()</PRE>
888
889
      <UL>Returns the map scale denominator for the current extent resolution</UL>
890
891
892
   <!-- METHOD PARAMETERS START -->
893
894
   <!-- METHOD PARAMETERS END -->
895
896
897
   <UL>
898
   <B>Returns:</B>
899
        <UL>
900
        map scale denominator
901
        </UL>
902
   </UL>
903
904
905
   <!-- ADDITIONAL ATTRIBUTES START -->
906
907
   <!-- ADDITIONAL ATTRIBUTES  END -->
908
<HR>
909
910
   <A NAME="getSize"><!-- --></A>
911
   <H3>getSize</H3>
912
   <PRE>Object <B>getSize</B>()</PRE>
913
914
      <UL>Returns the window size as stored in the model</UL>
915
916
917
   <!-- METHOD PARAMETERS START -->
918
919
   <!-- METHOD PARAMETERS END -->
920
921
922
   <UL>
923
   <B>Returns:</B>
924
        <UL>
925
        array with the window size
926
        </UL>
927
   </UL>
928
929
930
   <!-- ADDITIONAL ATTRIBUTES START -->
931
932
   <!-- ADDITIONAL ATTRIBUTES  END -->
933
<HR>
934
935
   <A NAME="getXY"><!-- --></A>
936
   <H3>getXY</H3>
937
   <PRE>Object <B>getXY</B>(pl)</PRE>
938
939
      <UL>Returns XY coordinates for given pixel line coords w.r.t. top left corner</UL>
940
941
942
   <!-- METHOD PARAMETERS START -->
943
944
   <UL>
945
   <B>Parameters:</B>
946
947
     <UL><CODE>pl</CODE> -    pixel line in extent to calculate
948
      </UL>
949
950
   </UL>
951
952
   <!-- METHOD PARAMETERS END -->
953
954
955
   <UL>
956
   <B>Returns:</B>
957
        <UL>
958
        point array of XY coordinates
959
        </UL>
960
   </UL>
961
962
963
   <!-- ADDITIONAL ATTRIBUTES START -->
964
965
   <!-- ADDITIONAL ATTRIBUTES  END -->
966
<HR>
967
968
   <A NAME="init"><!-- --></A>
969
   <H3>init</H3>
970
   <PRE>void <B>init</B>(extent, initialRes)</PRE>
971
972
      <UL>Initialization of the Extent tool, called as a loadModel event listener.</UL>
973
974
975
   <!-- METHOD PARAMETERS START -->
976
977
   <UL>
978
   <B>Parameters:</B>
979
980
     <UL><CODE>extent</CODE> -       the object being initialized
981
      </UL>
982
983
     <UL><CODE>initialRes</CODE> -   (optional) if supplied the extent resolution will be set to this value
984
      </UL>
985
986
   </UL>
987
988
   <!-- METHOD PARAMETERS END -->
989
990
991
992
   <!-- ADDITIONAL ATTRIBUTES START -->
993
994
   <!-- ADDITIONAL ATTRIBUTES  END -->
995
<HR>
996
997
   <A NAME="setBbox"><!-- --></A>
998
   <H3>setBbox</H3>
999
   <PRE>void <B>setBbox</B>(bbox)</PRE>
1000
1001
      <UL>Recalculates a given bbox and stores a proper aspect one in the model</UL>
1002
1003
1004
   <!-- METHOD PARAMETERS START -->
1005
1006
   <UL>
1007
   <B>Parameters:</B>
1008
1009
     <UL><CODE>bbox</CODE> -   an array with a bounding box
1010
      </UL>
1011
1012
   </UL>
1013
1014
   <!-- METHOD PARAMETERS END -->
1015
1016
1017
1018
   <!-- ADDITIONAL ATTRIBUTES START -->
1019
1020
   <!-- ADDITIONAL ATTRIBUTES  END -->
1021
<HR>
1022
1023
   <A NAME="setResolution"><!-- --></A>
1024
   <H3>setResolution</H3>
1025
   <PRE>void <B>setResolution</B>(size)</PRE>
1026
1027
      <UL>Adjust the resolution so the bbox fits in the specified width and height</UL>
1028
1029
1030
   <!-- METHOD PARAMETERS START -->
1031
1032
   <UL>
1033
   <B>Parameters:</B>
1034
1035
     <UL><CODE>size</CODE> -    width, height array passed in
1036
      </UL>
1037
1038
   </UL>
1039
1040
   <!-- METHOD PARAMETERS END -->
1041
1042
1043
1044
   <!-- ADDITIONAL ATTRIBUTES START -->
1045
1046
   <!-- ADDITIONAL ATTRIBUTES  END -->
1047
<HR>
1048
1049
   <A NAME="setScale"><!-- --></A>
1050
   <H3>setScale</H3>
1051
   <PRE>void <B>setScale</B>(scale)</PRE>
1052
1053
      <UL>Sets the model's resolution from mapScale input value.  The map center
1054
 remains fixed.</UL>
1055
1056
1057
   <!-- METHOD PARAMETERS START -->
1058
1059
   <UL>
1060
   <B>Parameters:</B>
1061
1062
     <UL><CODE>scale</CODE> -    map scale denominator value
1063
      </UL>
1064
1065
   </UL>
1066
1067
   <!-- METHOD PARAMETERS END -->
1068
1069
1070
1071
   <!-- ADDITIONAL ATTRIBUTES START -->
1072
1073
   <!-- ADDITIONAL ATTRIBUTES  END -->
1074
<HR>
1075
1076
   <A NAME="setSize"><!-- --></A>
1077
   <H3>setSize</H3>
1078
   <PRE>void <B>setSize</B>(size)</PRE>
1079
1080
      <UL>Stores a given window size in the model.
1081
 Can be used in the future for dynamic window resizing</UL>
1082
1083
1084
   <!-- METHOD PARAMETERS START -->
1085
1086
   <UL>
1087
   <B>Parameters:</B>
1088
1089
     <UL><CODE>size</CODE> -   an array with a window size
1090
      </UL>
1091
1092
   </UL>
1093
1094
   <!-- METHOD PARAMETERS END -->
1095
1096
1097
1098
   <!-- ADDITIONAL ATTRIBUTES START -->
1099
1100
   <!-- ADDITIONAL ATTRIBUTES  END -->
1101
<HR>
1102
1103
   <A NAME="setZoomLevels"><!-- --></A>
1104
   <H3>setZoomLevels</H3>
1105
   <PRE>void <B>setZoomLevels</B>(enabled,zoomLevels)</PRE>
1106
1107
1108
   <!-- METHOD PARAMETERS START -->
1109
1110
   <!-- METHOD PARAMETERS END -->
1111
1112
1113
1114
   <!-- ADDITIONAL ATTRIBUTES START -->
1115
1116
   <!-- ADDITIONAL ATTRIBUTES  END -->
1117
<HR>
1118
1119
   <A NAME="zoomToBox"><!-- --></A>
1120
   <H3>zoomToBox</H3>
1121
   <PRE>void <B>zoomToBox</B>(ul, lr)</PRE>
1122
1123
      <UL>Adjust the extent to the given bbox.  Resolution is recalculated.
1124
 Extent width and height remain fixed.</UL>
1125
1126
1127
   <!-- METHOD PARAMETERS START -->
1128
1129
   <UL>
1130
   <B>Parameters:</B>
1131
1132
     <UL><CODE>ul</CODE> -       upper left coordinate of bbox in XY projection coords
1133
      </UL>
1134
1135
     <UL><CODE>lr</CODE> -       lower right coordinate of bbox in XY projection coords
1136
      </UL>
1137
1138
   </UL>
1139
1140
   <!-- METHOD PARAMETERS END -->
1141
1142
1143
1144
   <!-- ADDITIONAL ATTRIBUTES START -->
1145
1146
   <!-- ADDITIONAL ATTRIBUTES  END -->
1147
<HR>
1148
1149
1150
1151
<!-- ============ METHOD DETAIL END ========== -->
1152
1153
<!-- ========= END OF CLASS DATA ========= -->
1154
1155
<!-- ========== START OF NAVBAR ========== -->
1156
<A NAME="navbar_bottom"><!-- --></A>
1157
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
1158
<TR>
1159
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1160
<A NAME="navbar_bottom_firstrow"><!-- --></A>
1161
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
1162
  <TR ALIGN="center" VALIGN="top">
1163
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1164
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">  <A HREF="overview-summary-Extent.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A>&nbsp;</TD>
1165
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1166
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A>&nbsp;</TD>
1167
  <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
1168
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1169
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1170
  </TR>
1171
</TABLE>
1172
</TD>
1173
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1174
<B><a href='http://mapbuilder.sourceforge.net'>Community Map Builder</a> 27 Apr 2008</B>
1175
</EM>
1176
</TD
1177
</TR>
1178
1179
<TR>
1180
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1181
&nbsp;<A HREF="EventLog.html"><B>PREV CLASS</B></A><!--
1182
   NEXT CLASS
1183
-->
1184
&nbsp;<A HREF="FeatureCollection.html"><B>NEXT CLASS</B></A></FONT></TD>
1185
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1186
  <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
1187
&nbsp;<A HREF="Extent.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
1188
&nbsp;
1189
<SCRIPT>
1190
  <!--
1191
  if(window==top) {
1192
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
1193
  }
1194
  //-->
1195
</SCRIPT>
1196
<NOSCRIPT>
1197
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
1198
</NOSCRIPT>
1199
</FONT></TD>
1200
</TR>
1201
<TR>
1202
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1203
  SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1204
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1205
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1206
</TR>
1207
</TABLE>
1208
1209
<!-- =========== END OF NAVBAR =========== -->
1210
1211
<HR>
1212
<FONT SIZE="-1">
1213
1214
</FONT>
1215
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Sun Apr 27 20:30:54 2008</div>
1216
</BODY>
1217
</HTML>