PageRenderTime 41ms CodeModel.GetById 26ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/com/google/maps/extras/rubberbandctrl/RubberBandCtrl.html

http://gmaps-utility-library-flash.googlecode.com/
HTML | 329 lines | 323 code | 0 blank | 6 comment | 0 complexity | 1dcd47cf70bd33c5dd0ec382aae90894 MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<html>
  3<head>
  4<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5<link rel="stylesheet" href="../../../../../style.css" type="text/css" media="screen">
  6<link rel="stylesheet" href="../../../../../print.css" type="text/css" media="print">
  7<meta content="RubberBandCtrl,com.google.maps.extras.rubberbandctrl.RubberBandCtrl,disable,enable,setLeftHandedKeyCodes,setPanIncrement,setRightHandedKeyCodes,setRubberBandColor,setRubberBandThickness" name="keywords">
  8<title>com.google.maps.extras.rubberbandctrl.RubberBandCtrl</title>
  9</head>
 10<body>
 11<script type="text/javascript" language="javascript" src="../../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../../cookies.js"></script><script type="text/javascript" language="javascript">
 12<!--
 13				asdocTitle = 'RubberBandCtrl - API Documentation';
 14				var baseRef = '../../../../../';
 15				window.onload = configPage;
 16			--></script>
 17<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
 18<tr>
 19<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../index-list.html')" href="../../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../../index.html?com/google/maps/extras/rubberbandctrl/RubberBandCtrl.html&amp;com/google/maps/extras/rubberbandctrl/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../../images/logo.jpg"></td>
 20</tr>
 21<tr class="titleTableRow2">
 22<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;RubberBandCtrl</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
 23</tr>
 24<tr class="titleTableRow3">
 25<td colspan="2">&nbsp;</td>
 26</tr>
 27</table>
 28<script type="text/javascript" language="javascript">
 29<!--
 30if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class RubberBandCtrl"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
 31--></script>
 32<div class="MainContent">
 33<table cellspacing="0" cellpadding="0" class="classHeaderTable">
 34<tr>
 35<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.google.maps.extras.rubberbandctrl</a></td>
 36</tr>
 37<tr>
 38<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class RubberBandCtrl</td>
 39</tr>
 40</table>
 41<p></p>
 42 The RubberBandCtrl class works with <em>Google Maps API for Flash</em> to
 43 provide a user with an efficient way to zoom in to a specific area on the
 44 map. This class also offers convenient keyboard shortcuts (with support for
 45 left and right-handed users) to rewind to previous map views, zoom out, as
 46 well as pan in any of four directions.
 47  <p>
 48 To zoom in to a specific area on the map, a user would normally click the
 49 map and drag it to its desired center point, and then move the mouse to the
 50 upper-left corner of the map to select the appropriate zoom level (a few
 51 tries might be necessary to get the right fit). RubberBandCtrl provides
 52 a more direct way to perform this task, as described below:
 53 <ul>
 54 <li>Hold a <em>Shift</em> key (the cursor changes to a cross).</li>
 55 <li>Click and hold the left mouse button to anchor the rubber band to the map.</li>
 56 <li>Drag the mouse to stretch the rubber band.</li>
 57 <li>Release the mouse button to snap the map to the area enclosed by the
 58 rubber band, or release the <em>Shift</em> key to cancel.</li>
 59 </ul>
 60 </p>
 61  <p>
 62 The <em>Shift</em> key can also be used in conjunction with any of the keys
 63 below to perform other kinds of map navigation:
 64  <table>
 65 <tr><th>Left-hand<br/>Key</th><th>Right-hand<br/>Key</th><th>Action</th></tr>
 66 <tr><td>?</td><td>Z</td><td>Zoom out one level</td></tr>
 67 <tr><td>{</td><td>Q</td><td>Rewind to previous map view</td></tr>
 68 <tr><td>:</td><td>A</td><td>Pan left</td></tr>
 69 <tr><td>"</td><td>S</td><td>Pan right</td></tr>
 70 <tr><td>L</td><td>D</td><td>Pan up</td></tr>
 71 <tr><td>&gt;</td><td>X</td><td>Pan down</td></tr>
 72 </table>
 73 </p>
 74  <p>
 75 <strong>Notes:</strong>&#xA0;
 76 <ul>
 77 <li>RubberBandCtrl is active only when the map has keyboard focus, which might require the user to first click the map.</li>
 78 <li>Adobe Flash security policy disables RubberBandCtrl when the map is in full-screen mode.</li>
 79 </ul>
 80 </p>
 81  <p>
 82 <strong>Contacts:</strong>
 83 <ul>
 84 <li>To contact the author of RubberBandCtrl, email kevin.macdonald AT thinkwrap DOT com</li>
 85 <li>Visit <code>http://www.spatialdatabox.com</code> for other Google Flash Map demos and related information.</li>
 86 <li>For updates to RubberBandCtrl, please visit <code>http://code.google.com/p/gmaps-utility-library-flash</code></li>
 87 </ul>
 88 </p>
 89  <p>
 90 <strong>Copyright Notice:</strong><br>
 91 <br>
 92 Copyright 2009 Kevin Macdonald<br>
 93 <br>
 94 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at<br>
 95 <br>
 96     http://www.apache.org/licenses/LICENSE-2.0<br>
 97 <br>
 98 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.<br>
 99 </p>
100 <p></p>
101<br>
102<hr>
103</div>
104<a name="methodSummary"></a>
105<div class="summarySection">
106<div class="summaryTableTitle">Public Methods</div>
107<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
108<tr>
109<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
110</tr>
111<tr class="">
112<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
113<div class="summarySignature">
114<a class="signatureLink" href="#RubberBandCtrl()">RubberBandCtrl</a>()</div>
115<div class="summaryTableDescription">
116 Creates an empty rubber band control object, which must be assigned to a Google Map via <code>enable ()</code>.</div>
117</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
118</tr>
119<tr class="">
120<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
121<div class="summarySignature">
122<a class="signatureLink" href="#disable()">disable</a>():void</div>
123<div class="summaryTableDescription">
124 Remove RubberBandCtrl functionality from a Google Map.</div>
125</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
126</tr>
127<tr class="">
128<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
129<div class="summarySignature">
130<a class="signatureLink" href="#enable()">enable</a>(googleMap:Map):void</div>
131<div class="summaryTableDescription">
132 Call this method once, ideally within the MapEvent.MAP_READY handler, to add
133 RubberBandCtrl functionality to a Google Map.</div>
134</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
135</tr>
136<tr class="">
137<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
138<div class="summarySignature">
139<a class="signatureLink" href="#setLeftHandedKeyCodes()">setLeftHandedKeyCodes</a>():void</div>
140<div class="summaryTableDescription">
141 Set key codes for left handed users, who operate the mouse with the left
142 hand, and keyboard with the right.</div>
143</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
144</tr>
145<tr class="">
146<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
147<div class="summarySignature">
148<a class="signatureLink" href="#setPanIncrement()">setPanIncrement</a>(pixels:int):void</div>
149<div class="summaryTableDescription">
150 Set the size, in pixels, for a keyboard initiated pan of the map.</div>
151</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
152</tr>
153<tr class="">
154<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
155<div class="summarySignature">
156<a class="signatureLink" href="#setRightHandedKeyCodes()">setRightHandedKeyCodes</a>():void</div>
157<div class="summaryTableDescription">
158 Set key codes for right handed users, who operate the mouse with the right
159 hand, and keyboard with the left.</div>
160</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
161</tr>
162<tr class="">
163<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
164<div class="summarySignature">
165<a class="signatureLink" href="#setRubberBandColor()">setRubberBandColor</a>(rgb:uint):void</div>
166<div class="summaryTableDescription">
167 Change the color of the rubber band.</div>
168</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
169</tr>
170<tr class="">
171<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
172<div class="summarySignature">
173<a class="signatureLink" href="#setRubberBandThickness()">setRubberBandThickness</a>(pixels:int):void</div>
174<div class="summaryTableDescription">
175 Set the thickness, in pixels, of the rubber band.</div>
176</td><td class="summaryTableOwnerCol">RubberBandCtrl</td>
177</tr>
178</table>
179</div>
180<script type="text/javascript" language="javascript">
181<!--
182showHideInherited();
183--></script>
184<div class="MainContent">
185<a name="constructorDetail"></a>
186<div class="detailSectionHeader">Constructor detail</div>
187<a name="RubberBandCtrl()"></a>
188<table cellspacing="0" cellpadding="0" class="detailHeader">
189<tr>
190<td class="detailHeaderName">RubberBandCtrl</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
191</tr>
192</table>
193<div class="detailBody">
194<code>public function RubberBandCtrl()</code><p>
195 Creates an empty rubber band control object, which must be assigned to a Google Map via <code>enable ()</code>.
196 
197 </p><br>
198<span class="label">Example</span>
199<br>The following example shows how to assign a Google Map object to a RubberBandCtrl object:
200 <div class='listing'><pre>
201         :
202     map.addEventListener (MapEvent.MAP_READY, onMapReady);
203         :
204 
205 public function onMapReady (event:MapEvent):void
206 {
207     rbCtrl = new RubberBandCtrl ();
208     rbCtrl.enable (map);
209 }
210 
211 const map:Map = new Map ();
212 var   rbCtrl:RubberBandCtrl = null;
213 </pre></div>
214 <p></p>
215</div>
216<a name="methodDetail"></a>
217<div class="detailSectionHeader">Method detail</div>
218<a name="disable()"></a>
219<table cellspacing="0" cellpadding="0" class="detailHeader">
220<tr>
221<td class="detailHeaderName">disable</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
222</tr>
223</table>
224<div class="detailBody">
225<code>public function disable():void</code><p>
226 Remove RubberBandCtrl functionality from a Google Map.
227 </p></div>
228<a name="enable()"></a>
229<table cellspacing="0" cellpadding="0" class="detailHeader">
230<tr>
231<td class="detailHeaderName">enable</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
232</tr>
233</table>
234<div class="detailBody">
235<code>public function enable(googleMap:Map):void</code><p>
236 Call this method once, ideally within the MapEvent.MAP_READY handler, to add
237 RubberBandCtrl functionality to a Google Map.
238  </p><span class="label">Parameters</span>
239<table border="0" cellspacing="0" cellpadding="0">
240<tr>
241<td width="20px"></td><td><code><span class="label">googleMap</span>:Map</code> &mdash; The map to receive RubberBandCtrl functionality.
242 </td>
243</tr>
244</table>
245</div>
246<a name="setLeftHandedKeyCodes()"></a>
247<table cellspacing="0" cellpadding="0" class="detailHeader">
248<tr>
249<td class="detailHeaderName">setLeftHandedKeyCodes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
250</tr>
251</table>
252<div class="detailBody">
253<code>public function setLeftHandedKeyCodes():void</code><p>
254 Set key codes for left handed users, who operate the mouse with the left
255 hand, and keyboard with the right.
256 </p></div>
257<a name="setPanIncrement()"></a>
258<table cellspacing="0" cellpadding="0" class="detailHeader">
259<tr>
260<td class="detailHeaderName">setPanIncrement</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
261</tr>
262</table>
263<div class="detailBody">
264<code>public function setPanIncrement(pixels:int):void</code><p>
265 Set the size, in pixels, for a keyboard initiated pan of the map.
266  </p><span class="label">Parameters</span>
267<table border="0" cellspacing="0" cellpadding="0">
268<tr>
269<td width="20px"></td><td><code><span class="label">pixels</span>:int</code> &mdash; The number of pixels to pan vertically or horizontally, when the user performs a pan action. Setting this value to 0 disables panning.
270 </td>
271</tr>
272</table>
273</div>
274<a name="setRightHandedKeyCodes()"></a>
275<table cellspacing="0" cellpadding="0" class="detailHeader">
276<tr>
277<td class="detailHeaderName">setRightHandedKeyCodes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
278</tr>
279</table>
280<div class="detailBody">
281<code>public function setRightHandedKeyCodes():void</code><p>
282 Set key codes for right handed users, who operate the mouse with the right
283 hand, and keyboard with the left.
284 </p></div>
285<a name="setRubberBandColor()"></a>
286<table cellspacing="0" cellpadding="0" class="detailHeader">
287<tr>
288<td class="detailHeaderName">setRubberBandColor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
289</tr>
290</table>
291<div class="detailBody">
292<code>public function setRubberBandColor(rgb:uint):void</code><p>
293 Change the color of the rubber band.
294  </p><span class="label">Parameters</span>
295<table border="0" cellspacing="0" cellpadding="0">
296<tr>
297<td width="20px"></td><td><code><span class="label">rgb</span>:uint</code> &mdash; A hexadecimal color value of the rubber band; for example, red is 0xFF0000, green is 0x00FF00 and blue is 0x0000FF.
298 </td>
299</tr>
300</table>
301</div>
302<a name="setRubberBandThickness()"></a>
303<table cellspacing="0" cellpadding="0" class="detailHeader">
304<tr>
305<td class="detailHeaderName">setRubberBandThickness</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
306</tr>
307</table>
308<div class="detailBody">
309<code>public function setRubberBandThickness(pixels:int):void</code><p>
310 Set the thickness, in pixels, of the rubber band.
311  </p><span class="label">Parameters</span>
312<table border="0" cellspacing="0" cellpadding="0">
313<tr>
314<td width="20px"></td><td><code><span class="label">pixels</span>:int</code> &mdash; The thickness of the rubber band, in pixels.
315 </td>
316</tr>
317</table>
318</div>
319<br>
320<br>
321<hr>
322<br>
323<p></p>
324<center class="copyright"> 
325</center>
326</div>
327</body>
328</html>
329<!-- -->