1 <!DOCTYPE html> 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 <html> 77 <head> 78 79 80 81 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 82 83 <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> 84 <title>CameraUpdateFactory | Android Developers</title> 85 86 <!-- STYLESHEETS --> 87 <link rel="stylesheet" 88 href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto"> 89 <link href="/assets/css/default.css" rel="stylesheet" type="text/css"> 90 91 92 93 <!-- JAVASCRIPT --> 94 <script src="//www.google.com/jsapi" type="text/javascript"></script> 95 <script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script> 96 <script type="text/javascript"> 97 var toRoot = "/"; 98 var devsite = false; 99 </script> 100 <script src="/assets/js/docs.js" type="text/javascript"></script> 101 102 <script type="text/javascript"> 103 var _gaq = _gaq || []; 104 _gaq.push(['_setAccount', 'UA-5831155-1']); 105 _gaq.push(['_trackPageview']); 106 107 (function() { 108 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 109 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 110 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 111 })(); 112 </script> 113 </head> 114 <body class="gc-documentation google 115 develop" itemscope itemtype="http://schema.org/Article"> 116 <div id="doc-api-level" class="" style="display:none"></div> 117 <a name="top"></a> 118 119 <a name="top"></a> 120 121 <!-- Header --> 122 <div id="header"> 123 <div class="wrap" id="header-wrap"> 124 <div class="col-3 logo"> 125 <a href="/index.html"> 126 <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" /> 127 </a> 128 <div class="btn-quicknav" id="btn-quicknav"> 129 <a href="#" class="arrow-inactive">Quicknav</a> 130 <a href="#" class="arrow-active">Quicknav</a> 131 </div> 132 </div> 133 <ul class="nav-x col-9"> 134 <li class="design"> 135 <a href="/design/index.html" 136 zh-tw-lang="" 137 zh-cn-lang="" 138 ru-lang="" 139 ko-lang="" 140 ja-lang="" 141 es-lang="Disear" 142 >Design</a></li> 143 <li class="develop"><a href="/develop/index.html" 144 zh-tw-lang="" 145 zh-cn-lang="" 146 ru-lang="" 147 ko-lang="" 148 ja-lang="" 149 es-lang="Desarrollar" 150 >Develop</a></li> 151 <li class="distribute last"><a href="/distribute/index.html" 152 zh-tw-lang="" 153 zh-cn-lang="" 154 ru-lang="" 155 ko-lang="" 156 ja-lang="" 157 es-lang="Distribuir" 158 >Distribute</a></li> 159 </ul> 160 161 <!-- New Search --> 162 <div class="menu-container"> 163 <div class="moremenu"> 164 <div id="more-btn"></div> 165 </div> 166 <div class="morehover" id="moremenu"> 167 <div class="top"></div> 168 <div class="mid"> 169 <div class="header">Links</div> 170 <ul> 171 <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> 172 <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> 173 <li><a href="/about/index.html">About Android</a></li> 174 </ul> 175 <div class="header">Android Sites</div> 176 <ul> 177 <li><a href="http://www.android.com">Android.com</a></li> 178 <li class="active"><a>Android Developers</a></li> 179 <li><a href="http://source.android.com">Android Open Source Project</a></li> 180 </ul> 181 182 183 184 <div class="header">Language</div> 185 <div id="language" class="locales"> 186 <select name="language" onChange="changeLangPref(this.value, true)"> 187 <option value="en">English</option> 188 <option value="es">Espaol</option> 189 <option value="ja"></option> 190 <option value="ko"></option> 191 <option value="ru"></option> 192 <option value="zh-cn"> ()</option> 193 <option value="zh-tw"> ()</option> 194 </select> 195 </div> 196 <script type="text/javascript"> 197 <!-- 198 loadLangPref(); 199 //--> 200 </script> 201 202 203 204 205 <br class="clearfix" /> 206 </div> 207 <div class="bottom"></div> 208 </div> 209 <div class="search" id="search-container"> 210 <div class="search-inner"> 211 <div id="search-btn"></div> 212 <div class="left"></div> 213 <form onsubmit="return submit_search()"> 214 <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" 215 onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)" 216 onkeydown="return search_changed(event, true, '/')" 217 onkeyup="return search_changed(event, false, '/')" /> 218 </form> 219 <div class="right"></div> 220 <a class="close hide">close</a> 221 <div class="left"></div> 222 <div class="right"></div> 223 </div> 224 </div> 225 226 <div class="search_filtered_wrapper reference"> 227 <div class="suggest-card reference no-display"> 228 <ul class="search_filtered"> 229 </ul> 230 </div> 231 </div> 232 233 <div class="search_filtered_wrapper docs"> 234 <div class="suggest-card dummy no-display"> </div> 235 <div class="suggest-card develop no-display"> 236 <ul class="search_filtered"> 237 </ul> 238 <div class="child-card guides no-display"> 239 </div> 240 <div class="child-card training no-display"> 241 </div> 242 </div> 243 <div class="suggest-card design no-display"> 244 <ul class="search_filtered"> 245 </ul> 246 </div> 247 <div class="suggest-card distribute no-display"> 248 <ul class="search_filtered"> 249 </ul> 250 </div> 251 </div> 252 253 </div> 254 <!-- /New Search> 255 256 257 <!-- Expanded quicknav --> 258 <div id="quicknav" class="col-9"> 259 <ul> 260 <li class="design"> 261 <ul> 262 <li><a href="/design/index.html">Get Started</a></li> 263 <li><a href="/design/style/index.html">Style</a></li> 264 <li><a href="/design/patterns/index.html">Patterns</a></li> 265 <li><a href="/design/building-blocks/index.html">Building Blocks</a></li> 266 <li><a href="/design/downloads/index.html">Downloads</a></li> 267 <li><a href="/design/videos/index.html">Videos</a></li> 268 </ul> 269 </li> 270 <li class="develop"> 271 <ul> 272 <li><a href="/training/index.html" 273 zh-tw-lang="" 274 zh-cn-lang="" 275 ru-lang="" 276 ko-lang="" 277 ja-lang="" 278 es-lang="Capacitacin" 279 >Training</a></li> 280 <li><a href="/guide/components/index.html" 281 zh-tw-lang="API " 282 zh-cn-lang="API " 283 ru-lang=" API" 284 ko-lang="API " 285 ja-lang="API " 286 es-lang="Guas de la API" 287 >API Guides</a></li> 288 <li><a href="/reference/packages.html" 289 zh-tw-lang="" 290 zh-cn-lang="" 291 ru-lang="" 292 ko-lang="" 293 ja-lang="" 294 es-lang="Referencia" 295 >Reference</a></li> 296 <li><a href="/tools/index.html" 297 zh-tw-lang="" 298 zh-cn-lang="" 299 ru-lang="" 300 ko-lang="" 301 ja-lang="" 302 es-lang="Herramientas" 303 >Tools</a> 304 <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul> 305 </li> 306 <li><a href="/google/index.html">Google Services</a> 307 </li> 308 </ul> 309 </li> 310 <li class="distribute last"> 311 <ul> 312 <li><a href="/distribute/index.html">Google Play</a></li> 313 <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li> 314 <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li> 315 <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li> 316 <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li> 317 <li><a href="/distribute/open.html">Open Distribution</a></li> 318 </ul> 319 </li> 320 </ul> 321 </div> 322 <!-- /Expanded quicknav --> 323 </div> 324 </div> 325 <!-- /Header --> 326 327 328 <div id="searchResults" class="wrap" style="display:none;"> 329 <h2 id="searchTitle">Results</h2> 330 <div id="leftSearchControl" class="search-control">Loading...</div> 331 </div> 332 333 334 335 <!-- Secondary x-nav --> 336 <div id="nav-x"> 337 <div class="wrap"> 338 <ul class="nav-x col-9 develop" style="width:100%"> 339 <li class="training"><a href="/training/index.html" 340 zh-tw-lang="" 341 zh-cn-lang="" 342 ru-lang="" 343 ko-lang="" 344 ja-lang="" 345 es-lang="Capacitacin" 346 >Training</a></li> 347 <li class="guide"><a href="/guide/components/index.html" 348 zh-tw-lang="API " 349 zh-cn-lang="API " 350 ru-lang=" API" 351 ko-lang="API " 352 ja-lang="API " 353 es-lang="Guas de la API" 354 >API Guides</a></li> 355 <li class="reference"><a href="/reference/packages.html" 356 zh-tw-lang="" 357 zh-cn-lang="" 358 ru-lang="" 359 ko-lang="" 360 ja-lang="" 361 es-lang="Referencia" 362 >Reference</a></li> 363 <li class="tools"><a href="/tools/index.html" 364 zh-tw-lang="" 365 zh-cn-lang="" 366 ru-lang="" 367 ko-lang="" 368 ja-lang="" 369 es-lang="Herramientas" 370 >Tools</a></li> 371 <li class="google"><a href="/google/index.html" 372 >Google Services</a> 373 </li> 374 </ul> 375 </div> 376 377 </div> 378 <!-- /Sendondary x-nav --> 379 380 381 382 383 384 385 386 387 388 <div class="wrap clearfix" id="body-content"> 389 <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> 390 <div id="devdoc-nav" class="scroll-pane"> 391 <a class="totop" href="#top" data-g-event="left-nav-top">to top</a> 392 393 394 395 <ul id="nav"> 396 397 <li class="nav-section"> 398 <div class="nav-section-header empty"><a href="/google/index.html"> 399 <span class="en">Overview</span> 400 </a></div> 401 </li> 402 403 <li class="nav-section"> 404 <div class="nav-section-header empty"><a href="/google/play-services/games.html"> 405 <span class="en">Games</span> 406 </a></div> 407 </li> 408 <li class="nav-section"> 409 <div class="nav-section-header empty"><a href="/google/play-services/location.html"> 410 <span class="en">Location</span> 411 </a></div> 412 </li> 413 <li class="nav-section"> 414 <div class="nav-section-header empty"><a href="/google/play-services/plus.html"> 415 <span class="en">Google+</span> 416 </a></div> 417 </li> 418 <li class="nav-section"> 419 <div class="nav-section-header empty"><a href="/google/play-services/maps.html"> 420 <span class="en">Google Maps</span> 421 </a></div> 422 </li> 423 <li class="nav-section"> 424 <div class="nav-section-header empty"><a href="/google/play-services/auth.html"> 425 <span class="en">Authorization</span> 426 </a></div> 427 </li> 428 429 430 431 <li class="nav-section"> 432 <div class="nav-section-header"><a href="/google/play-services/index.html"> 433 <span class="en">Google Play Services</span></a> 434 </div> 435 <ul> 436 <li><a href="/google/play-services/setup.html"> 437 <span class="en">Setup</span></a> 438 </li> 439 <li id="gms-tree-list" class="nav-section"> 440 <div class="nav-section-header"> 441 <a href="/reference/gms-packages.html"> 442 <span class="en">Reference</span> 443 </a> 444 <div> 445 </li> 446 </ul> 447 </li> 448 449 450 <li class="nav-section"> 451 <div class="nav-section-header"><a href="/google/play/billing/index.html"> 452 <span class="en">Google Play In-app Billing</span></a> 453 </div> 454 <ul> 455 <li><a href="/google/play/billing/billing_overview.html"> 456 <span class="en">Overview</span></a> 457 </li> 458 <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html"> 459 <span class="en">Version 3 API</span></a></div> 460 <ul> 461 <li><a href="/google/play/billing/billing_integrate.html"> 462 <span class="en">Implementing the API</span></a></li> 463 <li><a href="/google/play/billing/billing_reference.html"> 464 <span class="en">Reference</span></a></li> 465 </ul> 466 </li> 467 <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html"> 468 <span class="en">Version 2 API</span></a></div> 469 <ul> 470 <li><a href="/google/play/billing/v2/billing_integrate.html"> 471 <span class="en">Implementing the API</span></a></li> 472 <li><a href="/google/play/billing/v2/billing_subscriptions.html"> 473 <span class="en">Subscriptions</span></a></li> 474 <li><a href="/google/play/billing/v2/billing_reference.html"> 475 <span class="en">Reference</span></a></li> 476 </ul> 477 </li> 478 <li><a href="/google/play/billing/billing_subscriptions.html"> 479 <span class="en">Subscriptions</span></a> 480 </li> 481 <li><a href="/google/play/billing/billing_best_practices.html"> 482 <span class="en">Security and Design</span></a> 483 </li> 484 <li><a href="/google/play/billing/billing_testing.html"> 485 <span class="en">Testing In-app Billing</span></a> 486 </li> 487 <li><a href="/google/play/billing/billing_admin.html"> 488 <span class="en">Administering In-app Billing</span></a> 489 </li> 490 <li><a href="/google/play/billing/gp-purchase-status-api.html"> 491 <span class="en">Purchase Status API</span></a> 492 </li> 493 <li><a href="/google/play/billing/versions.html"> 494 <span class="en">Version Notes</span></a> 495 </li> 496 </ul> 497 </li> 498 499 500 501 <li class="nav-section"> 502 <div class="nav-section-header"><a href="/google/gcm/index.html"> 503 <span class="en">Google Cloud Messaging</span></a> 504 </div> 505 <ul> 506 <li><a href="/google/gcm/gs.html"> 507 <span class="en">Getting Started</span></a> 508 </li> 509 <li><a href="/google/gcm/gcm.html"> 510 <span class="en">Architectural Overview</span></a> 511 </li> 512 <li><a href="/google/gcm/ccs.html"> 513 <span class="en">Cloud Connection Server</span></a> 514 </li> 515 <li><a href="/google/gcm/notifications.html"> 516 <span class="en">User Notifications</span></a> 517 </li> 518 <li><a href="/google/gcm/client.html"> 519 <span class="en">GCM Client</span></a> 520 </li> 521 <li><a href="/google/gcm/server.html"> 522 <span class="en">GCM Server</span></a> 523 </li> 524 <li><a href="/google/gcm/adv.html"> 525 <span class="en">Advanced Topics</span></a> 526 </li> 527 <li><a href="/google/gcm/c2dm.html"> 528 <span class="en">Migration</span></a> 529 </li> 530 <li id="gcm-tree-list" class="nav-section"> 531 <div class="nav-section-header"> 532 <a href="/reference/gcm-packages.html"> 533 <span class="en">Reference</span> 534 </a> 535 <div> 536 </li> 537 </ul> 538 </li> 539 540 <li class="nav-section"> 541 <div class="nav-section-header"><a href="/google/play/dist.html"> 542 <span class="en">Google Play Distribution</span></a> 543 </div> 544 <ul> 545 <li><a href="/google/play/filters.html"> 546 <span class="en">Filters on Google Play</span></a> 547 </li> 548 549 <li><a href="/google/play/publishing/multiple-apks.html"> 550 <span class="en">Multiple APK Support</span></a> 551 </li> 552 <li><a href="/google/play/expansion-files.html"> 553 <span class="en">APK Expansion Files</span></a> 554 </li> 555 <li class="nav-section"> 556 <div class="nav-section-header"><a href="/google/play/licensing/index.html"> 557 <span class="en">Application Licensing</span></a> 558 </div> 559 <ul> 560 <li><a href="/google/play/licensing/overview.html"> 561 <span class="en">Licensing Overview</span></a> 562 </li> 563 <li><a href="/google/play/licensing/setting-up.html"> 564 <span class="en">Setting Up for Licensing</span></a> 565 </li> 566 <li><a href="/google/play/licensing/adding-licensing.html"> 567 <span class="en">Adding Licensing to Your App</span></a> 568 </li> 569 <li><a href="/google/play/licensing/licensing-reference.html"> 570 <span class="en">Licensing Reference</span></a> 571 </li> 572 </ul> 573 </li> 574 575 <li class="nav-section"> 576 <div class="nav-section-header"><a href="/google/backup/index.html"> 577 Android Backup Service</a> 578 </div> 579 <ul> 580 <li><a href="/google/backup/signup.html"> 581 Register</a> 582 </li> 583 </ul> 584 </li> 585 586 </ul> 587 588 </li> 589 590 591 592 </ul> 593 594 <script type="text/javascript"> 595 <!-- 596 buildToggleLists(); 597 changeNavLang(getLangPref()); 598 //--> 599 </script> 600 601 602 603 604 </div> 605 <script type="text/javascript"> 606 showGoogleRefTree(); 607 608 </script> 609 </div> <!-- end side-nav --> 610 <script> 611 $(document).ready(function() { 612 scrollIntoView("devdoc-nav"); 613 }); 614 </script> 615 616 617 618 619 620 621 <div class="col-12" id="doc-col"> 622 623 <div id="api-info-block"> 624 625 626 627 628 629 630 631 632 633 634 635 <div class="sum-details-links"> 636 637 Summary: 638 639 640 641 642 643 644 645 646 647 648 649 <a href="#pubmethods">Methods</a> 650 651 652 653 654 | <a href="#inhmethods">Inherited Methods</a> 655 656 | <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> 657 658 </div><!-- end sum-details-links --> 659 <div class="api-level"> 660 661 662 663 664 </div> 665 </div><!-- end api-info-block --> 666 667 668 <!-- ======== START OF CLASS DATA ======== --> 669 670 <div id="jd-header"> 671 public 672 673 final 674 675 class 676 <h1 itemprop="name">CameraUpdateFactory</h1> 677 678 679 680 681 extends Object<br/> 682 683 684 685 686 687 688 689 690 691 </div><!-- end header --> 692 693 <div id="naMessage"></div> 694 695 <div id="jd-content" class="api apilevel-"> 696 <table class="jd-inheritance-table"> 697 698 699 <tr> 700 701 <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td> 702 </tr> 703 704 705 <tr> 706 707 <td class="jd-inheritance-space"> ↳</td> 708 709 <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.maps.CameraUpdateFactory</td> 710 </tr> 711 712 713 </table> 714 715 716 717 718 719 720 721 <div class="jd-descr"> 722 723 724 <h2>Class Overview</h2> 725 <p itemprop="articleBody">A class containing methods for creating <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> objects that change a map's camera. 726 To modify the map's camera, call <code><a href="/reference/com/google/android/gms/maps/GoogleMap.html#animateCamera(com.google.android.gms.maps.CameraUpdate)">animateCamera(CameraUpdate)</a></code>, 727 <code><a href="/reference/com/google/android/gms/maps/GoogleMap.html#animateCamera(com.google.android.gms.maps.CameraUpdate, com.google.android.gms.maps.GoogleMap.CancelableCallback)">animateCamera(CameraUpdate, GoogleMap.CancelableCallback)</a></code> or 728 <code><a href="/reference/com/google/android/gms/maps/GoogleMap.html#moveCamera(com.google.android.gms.maps.CameraUpdate)">moveCamera(CameraUpdate)</a></code>, using a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> object created with this 729 class. 730 <p> 731 For example, to zoom in on a map, you can use the following code: 732 <pre> <code>GoogleMap map = ...; 733 map.animateCamera(CameraUpdateFactory.zoomIn());</code></pre> 734 <p> 735 Prior to using any methods from this class, you must do one of the following to ensure that this 736 class is initialized: 737 <ul> 738 <li> Wait for a <code><a href="/reference/com/google/android/gms/maps/GoogleMap.html">GoogleMap</a></code> to become available from a <code><a href="/reference/com/google/android/gms/maps/MapFragment.html">MapFragment</a></code> or 739 <code><a href="/reference/com/google/android/gms/maps/MapView.html">MapView</a></code> that you have added to your application. You can verify that the 740 <code><a href="/reference/com/google/android/gms/maps/GoogleMap.html">GoogleMap</a></code> is available by calling the <code>getMap()</code> method and checking that the 741 returned object is not null. 742 <li> Call <code><a href="/reference/com/google/android/gms/maps/MapsInitializer.html#initialize(android.content.Context)">initialize(Context)</a></code>. As long as a 743 <code><a href="/reference/com/google/android/gms/common/GooglePlayServicesNotAvailableException.html">GooglePlayServicesNotAvailableException</a></code> isn't thrown, this class will be correctly initialized. 744 </ul> 745 <p> 746 <h3>Developer Guide</h3> 747 <p> 748 For more information, read the <a 749 href="https://developers.google.com/maps/documentation/android/views">Changing the View</a> 750 developer guide. 751 </p> 752 753 754 755 756 757 </div><!-- jd-descr --> 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 <div class="jd-descr"> 775 776 777 <h2>Summary</h2> 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 <!-- ========== METHOD SUMMARY =========== --> 806 <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> 807 808 809 810 811 <tr class="alt-color api apilevel-" > 812 <td class="jd-typecol"><nobr> 813 814 815 816 static 817 818 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 819 </td> 820 <td class="jd-linkcol" width="100%"><nobr> 821 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#newCameraPosition(com.google.android.gms.maps.model.CameraPosition)">newCameraPosition</a></span>(<a href="/reference/com/google/android/gms/maps/model/CameraPosition.html">CameraPosition</a> cameraPosition)</nobr> 822 823 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that moves the camera to a specified <code><a href="/reference/com/google/android/gms/maps/model/CameraPosition.html">CameraPosition</a></code>.</div> 824 825 </td></tr> 826 827 828 829 <tr class=" api apilevel-" > 830 <td class="jd-typecol"><nobr> 831 832 833 834 static 835 836 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 837 </td> 838 <td class="jd-linkcol" width="100%"><nobr> 839 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#newLatLng(com.google.android.gms.maps.model.LatLng)">newLatLng</a></span>(<a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a> latLng)</nobr> 840 841 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that moves the center of the screen to a latitude and 842 longitude specified by a <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> object.</div> 843 844 </td></tr> 845 846 847 848 <tr class="alt-color api apilevel-" > 849 <td class="jd-typecol"><nobr> 850 851 852 853 static 854 855 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 856 </td> 857 <td class="jd-linkcol" width="100%"><nobr> 858 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#newLatLngBounds(com.google.android.gms.maps.model.LatLngBounds, int)">newLatLngBounds</a></span>(<a href="/reference/com/google/android/gms/maps/model/LatLngBounds.html">LatLngBounds</a> bounds, int padding)</nobr> 859 860 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that transforms the camera such that the specified 861 latitude/longitude bounds are centered on screen at the greatest possible zoom level.</div> 862 863 </td></tr> 864 865 866 867 <tr class=" api apilevel-" > 868 <td class="jd-typecol"><nobr> 869 870 871 872 static 873 874 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 875 </td> 876 <td class="jd-linkcol" width="100%"><nobr> 877 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#newLatLngBounds(com.google.android.gms.maps.model.LatLngBounds, int, int, int)">newLatLngBounds</a></span>(<a href="/reference/com/google/android/gms/maps/model/LatLngBounds.html">LatLngBounds</a> bounds, int width, int height, int padding)</nobr> 878 879 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that transforms the camera such that the specified 880 latitude/longitude bounds are centered on screen within a bounding box of specified 881 dimensions at the greatest possible zoom level.</div> 882 883 </td></tr> 884 885 886 887 <tr class="alt-color api apilevel-" > 888 <td class="jd-typecol"><nobr> 889 890 891 892 static 893 894 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 895 </td> 896 <td class="jd-linkcol" width="100%"><nobr> 897 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#newLatLngZoom(com.google.android.gms.maps.model.LatLng, float)">newLatLngZoom</a></span>(<a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a> latLng, float zoom)</nobr> 898 899 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that moves the center of the screen to a latitude and 900 longitude specified by a <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> object, and moves to the given zoom level.</div> 901 902 </td></tr> 903 904 905 906 <tr class=" api apilevel-" > 907 <td class="jd-typecol"><nobr> 908 909 910 911 static 912 913 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 914 </td> 915 <td class="jd-linkcol" width="100%"><nobr> 916 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#scrollBy(float, float)">scrollBy</a></span>(float xPixel, float yPixel)</nobr> 917 918 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that scrolls the camera over the map, shifting the center of 919 view by the specified number of pixels in the x and y directions.</div> 920 921 </td></tr> 922 923 924 925 <tr class="alt-color api apilevel-" > 926 <td class="jd-typecol"><nobr> 927 928 929 930 static 931 932 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 933 </td> 934 <td class="jd-linkcol" width="100%"><nobr> 935 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#zoomBy(float, android.graphics.Point)">zoomBy</a></span>(float amount, Point focus)</nobr> 936 937 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that shifts the zoom level of the current camera viewpoint.</div> 938 939 </td></tr> 940 941 942 943 <tr class=" api apilevel-" > 944 <td class="jd-typecol"><nobr> 945 946 947 948 static 949 950 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 951 </td> 952 <td class="jd-linkcol" width="100%"><nobr> 953 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#zoomBy(float)">zoomBy</a></span>(float amount)</nobr> 954 955 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that shifts the zoom level of the current camera viewpoint.</div> 956 957 </td></tr> 958 959 960 961 <tr class="alt-color api apilevel-" > 962 <td class="jd-typecol"><nobr> 963 964 965 966 static 967 968 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 969 </td> 970 <td class="jd-linkcol" width="100%"><nobr> 971 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#zoomIn()">zoomIn</a></span>()</nobr> 972 973 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that zooms in on the map by moving the viewpoint's height 974 closer to the Earth's surface.</div> 975 976 </td></tr> 977 978 979 980 <tr class=" api apilevel-" > 981 <td class="jd-typecol"><nobr> 982 983 984 985 static 986 987 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 988 </td> 989 <td class="jd-linkcol" width="100%"><nobr> 990 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#zoomOut()">zoomOut</a></span>()</nobr> 991 992 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that zooms out on the map by moving the viewpoint's height 993 farther away from the Earth's surface.</div> 994 995 </td></tr> 996 997 998 999 <tr class="alt-color api apilevel-" > 1000 <td class="jd-typecol"><nobr> 1001 1002 1003 1004 static 1005 1006 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></nobr> 1007 </td> 1008 <td class="jd-linkcol" width="100%"><nobr> 1009 <span class="sympad"><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#zoomTo(float)">zoomTo</a></span>(float zoom)</nobr> 1010 1011 <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that moves the camera viewpoint to a particular zoom level.</div> 1012 1013 </td></tr> 1014 1015 1016 1017 </table> 1018 1019 1020 1021 1022 1023 1024 1025 <!-- ========== METHOD SUMMARY =========== --> 1026 <table id="inhmethods" class="jd-sumtable"><tr><th> 1027 <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> 1028 <div style="clear:left;">Inherited Methods</div></th></tr> 1029 1030 1031 <tr class="api apilevel-" > 1032 <td colspan="12"> 1033 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 1034 ><img id="inherited-methods-java.lang.Object-trigger" 1035 src="/assets/images/triangle-closed.png" 1036 class="jd-expando-trigger-img" /></a> 1037 From class 1038 1039 java.lang.Object 1040 1041 <div id="inherited-methods-java.lang.Object"> 1042 <div id="inherited-methods-java.lang.Object-list" 1043 class="jd-inheritedlinks"> 1044 </div> 1045 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 1046 <table class="jd-sumtable-expando"> 1047 1048 1049 1050 1051 <tr class="alt-color api apilevel-" > 1052 <td class="jd-typecol"><nobr> 1053 1054 1055 1056 1057 1058 Object</nobr> 1059 </td> 1060 <td class="jd-linkcol" width="100%"><nobr> 1061 <span class="sympad">clone</span>()</nobr> 1062 1063 </td></tr> 1064 1065 1066 1067 <tr class=" api apilevel-" > 1068 <td class="jd-typecol"><nobr> 1069 1070 1071 1072 1073 1074 boolean</nobr> 1075 </td> 1076 <td class="jd-linkcol" width="100%"><nobr> 1077 <span class="sympad">equals</span>(Object arg0)</nobr> 1078 1079 </td></tr> 1080 1081 1082 1083 <tr class="alt-color api apilevel-" > 1084 <td class="jd-typecol"><nobr> 1085 1086 1087 1088 1089 1090 void</nobr> 1091 </td> 1092 <td class="jd-linkcol" width="100%"><nobr> 1093 <span class="sympad">finalize</span>()</nobr> 1094 1095 </td></tr> 1096 1097 1098 1099 <tr class=" api apilevel-" > 1100 <td class="jd-typecol"><nobr> 1101 1102 1103 final 1104 1105 1106 Class<?></nobr> 1107 </td> 1108 <td class="jd-linkcol" width="100%"><nobr> 1109 <span class="sympad">getClass</span>()</nobr> 1110 1111 </td></tr> 1112 1113 1114 1115 <tr class="alt-color api apilevel-" > 1116 <td class="jd-typecol"><nobr> 1117 1118 1119 1120 1121 1122 int</nobr> 1123 </td> 1124 <td class="jd-linkcol" width="100%"><nobr> 1125 <span class="sympad">hashCode</span>()</nobr> 1126 1127 </td></tr> 1128 1129 1130 1131 <tr class=" api apilevel-" > 1132 <td class="jd-typecol"><nobr> 1133 1134 1135 final 1136 1137 1138 void</nobr> 1139 </td> 1140 <td class="jd-linkcol" width="100%"><nobr> 1141 <span class="sympad">notify</span>()</nobr> 1142 1143 </td></tr> 1144 1145 1146 1147 <tr class="alt-color api apilevel-" > 1148 <td class="jd-typecol"><nobr> 1149 1150 1151 final 1152 1153 1154 void</nobr> 1155 </td> 1156 <td class="jd-linkcol" width="100%"><nobr> 1157 <span class="sympad">notifyAll</span>()</nobr> 1158 1159 </td></tr> 1160 1161 1162 1163 <tr class=" api apilevel-" > 1164 <td class="jd-typecol"><nobr> 1165 1166 1167 1168 1169 1170 String</nobr> 1171 </td> 1172 <td class="jd-linkcol" width="100%"><nobr> 1173 <span class="sympad">toString</span>()</nobr> 1174 1175 </td></tr> 1176 1177 1178 1179 <tr class="alt-color api apilevel-" > 1180 <td class="jd-typecol"><nobr> 1181 1182 1183 final 1184 1185 1186 void</nobr> 1187 </td> 1188 <td class="jd-linkcol" width="100%"><nobr> 1189 <span class="sympad">wait</span>()</nobr> 1190 1191 </td></tr> 1192 1193 1194 1195 <tr class=" api apilevel-" > 1196 <td class="jd-typecol"><nobr> 1197 1198 1199 final 1200 1201 1202 void</nobr> 1203 </td> 1204 <td class="jd-linkcol" width="100%"><nobr> 1205 <span class="sympad">wait</span>(long arg0, int arg1)</nobr> 1206 1207 </td></tr> 1208 1209 1210 1211 <tr class="alt-color api apilevel-" > 1212 <td class="jd-typecol"><nobr> 1213 1214 1215 final 1216 1217 1218 void</nobr> 1219 </td> 1220 <td class="jd-linkcol" width="100%"><nobr> 1221 <span class="sympad">wait</span>(long arg0)</nobr> 1222 1223 </td></tr> 1224 1225 1226 </table> 1227 </div> 1228 </div> 1229 </td></tr> 1230 1231 1232 </table> 1233 1234 1235 </div><!-- jd-descr (summary) --> 1236 1237 <!-- Details --> 1238 1239 1240 1241 1242 1243 1244 1245 1246 <!-- XML Attributes --> 1247 1248 1249 <!-- Enum Values --> 1250 1251 1252 <!-- Constants --> 1253 1254 1255 <!-- Fields --> 1256 1257 1258 <!-- Public ctors --> 1259 1260 1261 1262 <!-- ========= CONSTRUCTOR DETAIL ======== --> 1263 <!-- Protected ctors --> 1264 1265 1266 1267 <!-- ========= METHOD DETAIL ======== --> 1268 <!-- Public methdos --> 1269 1270 <h2>Public Methods</h2> 1271 1272 1273 1274 <A NAME="newCameraPosition(com.google.android.gms.maps.model.CameraPosition)"></A> 1275 1276 <div class="jd-details api apilevel-"> 1277 <h4 class="jd-details-title"> 1278 <span class="normal"> 1279 public 1280 static 1281 1282 1283 1284 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1285 </span> 1286 <span class="sympad">newCameraPosition</span> 1287 <span class="normal">(<a href="/reference/com/google/android/gms/maps/model/CameraPosition.html">CameraPosition</a> cameraPosition)</span> 1288 </h4> 1289 <div class="api-level"> 1290 <div></div> 1291 1292 1293 1294 </div> 1295 <div class="jd-details-descr"> 1296 1297 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that moves the camera to a specified <code><a href="/reference/com/google/android/gms/maps/model/CameraPosition.html">CameraPosition</a></code>. 1298 In effect, this creates a transformation from the <code><a href="/reference/com/google/android/gms/maps/model/CameraPosition.html">CameraPosition</a></code> object's latitude, 1299 longitude, zoom level, bearing and tilt.</p></div> 1300 <div class="jd-tagdata"> 1301 <h5 class="jd-tagtitle">Returns</h5> 1302 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1303 </li></ul> 1304 </div> 1305 1306 </div> 1307 </div> 1308 1309 1310 <A NAME="newLatLng(com.google.android.gms.maps.model.LatLng)"></A> 1311 1312 <div class="jd-details api apilevel-"> 1313 <h4 class="jd-details-title"> 1314 <span class="normal"> 1315 public 1316 static 1317 1318 1319 1320 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1321 </span> 1322 <span class="sympad">newLatLng</span> 1323 <span class="normal">(<a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a> latLng)</span> 1324 </h4> 1325 <div class="api-level"> 1326 <div></div> 1327 1328 1329 1330 </div> 1331 <div class="jd-details-descr"> 1332 1333 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that moves the center of the screen to a latitude and 1334 longitude specified by a <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> object. This centers the camera on the <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> 1335 object.</p></div> 1336 <div class="jd-tagdata"> 1337 <h5 class="jd-tagtitle">Parameters</h5> 1338 <table class="jd-tagtable"> 1339 <tr> 1340 <th>latLng</td> 1341 <td>a <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> object containing the desired latitude and longitude.</td> 1342 </tr> 1343 </table> 1344 </div> 1345 <div class="jd-tagdata"> 1346 <h5 class="jd-tagtitle">Returns</h5> 1347 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1348 </li></ul> 1349 </div> 1350 1351 </div> 1352 </div> 1353 1354 1355 <A NAME="newLatLngBounds(com.google.android.gms.maps.model.LatLngBounds, int)"></A> 1356 1357 <div class="jd-details api apilevel-"> 1358 <h4 class="jd-details-title"> 1359 <span class="normal"> 1360 public 1361 static 1362 1363 1364 1365 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1366 </span> 1367 <span class="sympad">newLatLngBounds</span> 1368 <span class="normal">(<a href="/reference/com/google/android/gms/maps/model/LatLngBounds.html">LatLngBounds</a> bounds, int padding)</span> 1369 </h4> 1370 <div class="api-level"> 1371 <div></div> 1372 1373 1374 1375 </div> 1376 <div class="jd-details-descr"> 1377 1378 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that transforms the camera such that the specified 1379 latitude/longitude bounds are centered on screen at the greatest possible zoom level. You can 1380 specify padding, in order to inset the bounding box from the map view's edges. The returned 1381 <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> has a bearing of 0 and a tilt of 0. 1382 <p> 1383 Do not change the camera with this camera update until the map has undergone layout (in order 1384 for this method to correctly determine the appropriate bounding box and zoom level, the map 1385 must have a size). Otherwise an <code><a href="/reference/java/lang/IllegalStateException.html">IllegalStateException</a></code> will be thrown. It is NOT 1386 sufficient for the map to be available (i.e. <code><a href="/reference/com/google/android/gms/maps/MapFragment.html#getMap()">getMap()</a></code> returns a non-null 1387 object); the view containing the map must have also undergone layout such that its dimensions 1388 have been determined. If you cannot be sure that this has occured, use 1389 <code><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#newLatLngBounds(com.google.android.gms.maps.model.LatLngBounds, int, int, int)">newLatLngBounds(LatLngBounds, int, int, int)</a></code> instead and provide the dimensions of 1390 the map manually.</p></div> 1391 <div class="jd-tagdata"> 1392 <h5 class="jd-tagtitle">Parameters</h5> 1393 <table class="jd-tagtable"> 1394 <tr> 1395 <th>bounds</td> 1396 <td>region to fit on screen</td> 1397 </tr> 1398 <tr> 1399 <th>padding</td> 1400 <td>space (in px) to leave between the bounding box edges and the view edges. This 1401 value is applied to all four sides of the bounding box.</td> 1402 </tr> 1403 </table> 1404 </div> 1405 <div class="jd-tagdata"> 1406 <h5 class="jd-tagtitle">Returns</h5> 1407 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1408 </li></ul> 1409 </div> 1410 1411 </div> 1412 </div> 1413 1414 1415 <A NAME="newLatLngBounds(com.google.android.gms.maps.model.LatLngBounds, int, int, int)"></A> 1416 1417 <div class="jd-details api apilevel-"> 1418 <h4 class="jd-details-title"> 1419 <span class="normal"> 1420 public 1421 static 1422 1423 1424 1425 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1426 </span> 1427 <span class="sympad">newLatLngBounds</span> 1428 <span class="normal">(<a href="/reference/com/google/android/gms/maps/model/LatLngBounds.html">LatLngBounds</a> bounds, int width, int height, int padding)</span> 1429 </h4> 1430 <div class="api-level"> 1431 <div></div> 1432 1433 1434 1435 </div> 1436 <div class="jd-details-descr"> 1437 1438 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that transforms the camera such that the specified 1439 latitude/longitude bounds are centered on screen within a bounding box of specified 1440 dimensions at the greatest possible zoom level. You can specify additional padding, to 1441 further restrict the size of the bounding box. The returned <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> has a 1442 bearing of 0 and a tilt of 0. 1443 <p> 1444 Unlike <code><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#newLatLngBounds(com.google.android.gms.maps.model.LatLngBounds, int)">newLatLngBounds(LatLngBounds, int)</a></code>, you can use the <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> 1445 returned by this method to change the camera prior to the map's the layout phase, because the 1446 arguments specify the desired size of the bounding box.</p></div> 1447 <div class="jd-tagdata"> 1448 <h5 class="jd-tagtitle">Parameters</h5> 1449 <table class="jd-tagtable"> 1450 <tr> 1451 <th>bounds</td> 1452 <td>the region to fit in the bounding box</td> 1453 </tr> 1454 <tr> 1455 <th>width</td> 1456 <td>bounding box width in pixels (px)</td> 1457 </tr> 1458 <tr> 1459 <th>height</td> 1460 <td>bounding box height in pixels (px)</td> 1461 </tr> 1462 <tr> 1463 <th>padding</td> 1464 <td>additional size restriction (in px) of the bounding box</td> 1465 </tr> 1466 </table> 1467 </div> 1468 <div class="jd-tagdata"> 1469 <h5 class="jd-tagtitle">Returns</h5> 1470 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1471 </li></ul> 1472 </div> 1473 1474 </div> 1475 </div> 1476 1477 1478 <A NAME="newLatLngZoom(com.google.android.gms.maps.model.LatLng, float)"></A> 1479 1480 <div class="jd-details api apilevel-"> 1481 <h4 class="jd-details-title"> 1482 <span class="normal"> 1483 public 1484 static 1485 1486 1487 1488 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1489 </span> 1490 <span class="sympad">newLatLngZoom</span> 1491 <span class="normal">(<a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a> latLng, float zoom)</span> 1492 </h4> 1493 <div class="api-level"> 1494 <div></div> 1495 1496 1497 1498 </div> 1499 <div class="jd-details-descr"> 1500 1501 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that moves the center of the screen to a latitude and 1502 longitude specified by a <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> object, and moves to the given zoom level.</p></div> 1503 <div class="jd-tagdata"> 1504 <h5 class="jd-tagtitle">Parameters</h5> 1505 <table class="jd-tagtable"> 1506 <tr> 1507 <th>latLng</td> 1508 <td>a <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> object containing the desired latitude and longitude.</td> 1509 </tr> 1510 <tr> 1511 <th>zoom</td> 1512 <td>the desired zoom level, in the range of 2.0 to 21.0. Values below this range are 1513 set to 2.0, and values above it are set to 21.0. Increase the value to zoom in. 1514 Not all areas have tiles at the largest zoom levels.</td> 1515 </tr> 1516 </table> 1517 </div> 1518 <div class="jd-tagdata"> 1519 <h5 class="jd-tagtitle">Returns</h5> 1520 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1521 </li></ul> 1522 </div> 1523 1524 </div> 1525 </div> 1526 1527 1528 <A NAME="scrollBy(float, float)"></A> 1529 1530 <div class="jd-details api apilevel-"> 1531 <h4 class="jd-details-title"> 1532 <span class="normal"> 1533 public 1534 static 1535 1536 1537 1538 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1539 </span> 1540 <span class="sympad">scrollBy</span> 1541 <span class="normal">(float xPixel, float yPixel)</span> 1542 </h4> 1543 <div class="api-level"> 1544 <div></div> 1545 1546 1547 1548 </div> 1549 <div class="jd-details-descr"> 1550 1551 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that scrolls the camera over the map, shifting the center of 1552 view by the specified number of pixels in the x and y directions. 1553 <p> 1554 Examples: 1555 <ul> 1556 <li>If xPixel = 5 and yPixel = 0, the system scrolls right by moving the camera so that the 1557 map appears to have shifted 5 pixels to the left.</li> 1558 <li>If xPixel = 0 and yPixel = 5, the system scrolls down by moving the camera so that the 1559 map appears to have shifted 5 pixels upwards.</li> 1560 </ul> 1561 <p> 1562 The scrolling is relative to the camera's current orientation. For example, if the camera is 1563 bearing 90 degrees, then east is "up" and scrolling right will move the camera south.</p></div> 1564 <div class="jd-tagdata"> 1565 <h5 class="jd-tagtitle">Parameters</h5> 1566 <table class="jd-tagtable"> 1567 <tr> 1568 <th>xPixel</td> 1569 <td>the number of pixels to scroll horizontally. A positive value moves the camera 1570 to the right, with respect to its current orientation. A negative value moves the 1571 camera to the left, with respect to its current orientation.</td> 1572 </tr> 1573 <tr> 1574 <th>yPixel</td> 1575 <td>the number of pixels to scroll vertically. A positive value moves the camera 1576 downwards, with respect to its current orientation. A negative value moves the 1577 camera upwards, with respect to its current orientation.</td> 1578 </tr> 1579 </table> 1580 </div> 1581 <div class="jd-tagdata"> 1582 <h5 class="jd-tagtitle">Returns</h5> 1583 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1584 </li></ul> 1585 </div> 1586 1587 </div> 1588 </div> 1589 1590 1591 <A NAME="zoomBy(float, android.graphics.Point)"></A> 1592 1593 <div class="jd-details api apilevel-"> 1594 <h4 class="jd-details-title"> 1595 <span class="normal"> 1596 public 1597 static 1598 1599 1600 1601 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1602 </span> 1603 <span class="sympad">zoomBy</span> 1604 <span class="normal">(float amount, Point focus)</span> 1605 </h4> 1606 <div class="api-level"> 1607 <div></div> 1608 1609 1610 1611 </div> 1612 <div class="jd-details-descr"> 1613 1614 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that shifts the zoom level of the current camera viewpoint. 1615 <p> 1616 A point specified by focus will remain fixed (i.e., it corresponds to the same lat/long both 1617 before and after the zoom process). 1618 <p> 1619 This method is different to <code><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#zoomTo(float)">zoomTo(float)</a></code> in that zoom is relative to the current 1620 camera. 1621 <p> 1622 For example, if the <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> (11.11, 22.22) is currently at the screen location (23, 1623 45). After calling this method with a zoom amount and this <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code>, the screen 1624 location of this <code><a href="/reference/com/google/android/gms/maps/model/LatLng.html">LatLng</a></code> will still be (23, 45).</p></div> 1625 <div class="jd-tagdata"> 1626 <h5 class="jd-tagtitle">Parameters</h5> 1627 <table class="jd-tagtable"> 1628 <tr> 1629 <th>amount</td> 1630 <td>amount to change the zoom level. Positive values indicate zooming closer to the 1631 surface of the Earth while negative values indicate zooming away from the surface 1632 of the Earth.</td> 1633 </tr> 1634 <tr> 1635 <th>focus</td> 1636 <td>pixel location on the screen that is to remain fixed after the zooming process. 1637 The lat/long that was at that pixel location before the camera move will remain 1638 the same after the camera has moved.</td> 1639 </tr> 1640 </table> 1641 </div> 1642 <div class="jd-tagdata"> 1643 <h5 class="jd-tagtitle">Returns</h5> 1644 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1645 </li></ul> 1646 </div> 1647 1648 </div> 1649 </div> 1650 1651 1652 <A NAME="zoomBy(float)"></A> 1653 1654 <div class="jd-details api apilevel-"> 1655 <h4 class="jd-details-title"> 1656 <span class="normal"> 1657 public 1658 static 1659 1660 1661 1662 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1663 </span> 1664 <span class="sympad">zoomBy</span> 1665 <span class="normal">(float amount)</span> 1666 </h4> 1667 <div class="api-level"> 1668 <div></div> 1669 1670 1671 1672 </div> 1673 <div class="jd-details-descr"> 1674 1675 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that shifts the zoom level of the current camera viewpoint. 1676 <p> 1677 This method is different to <code><a href="/reference/com/google/android/gms/maps/CameraUpdateFactory.html#zoomTo(float)">zoomTo(float)</a></code> in that zoom is relative to the current 1678 camera.</p></div> 1679 <div class="jd-tagdata"> 1680 <h5 class="jd-tagtitle">Parameters</h5> 1681 <table class="jd-tagtable"> 1682 <tr> 1683 <th>amount</td> 1684 <td>amount to change the zoom level. Positive values indicate zooming closer to the 1685 surface of the Earth while negative values indicate zooming away from the surface 1686 of the Earth.</td> 1687 </tr> 1688 </table> 1689 </div> 1690 <div class="jd-tagdata"> 1691 <h5 class="jd-tagtitle">Returns</h5> 1692 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1693 </li></ul> 1694 </div> 1695 1696 </div> 1697 </div> 1698 1699 1700 <A NAME="zoomIn()"></A> 1701 1702 <div class="jd-details api apilevel-"> 1703 <h4 class="jd-details-title"> 1704 <span class="normal"> 1705 public 1706 static 1707 1708 1709 1710 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1711 </span> 1712 <span class="sympad">zoomIn</span> 1713 <span class="normal">()</span> 1714 </h4> 1715 <div class="api-level"> 1716 <div></div> 1717 1718 1719 1720 </div> 1721 <div class="jd-details-descr"> 1722 1723 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that zooms in on the map by moving the viewpoint's height 1724 closer to the Earth's surface. The zoom increment is 1.0.</p></div> 1725 <div class="jd-tagdata"> 1726 <h5 class="jd-tagtitle">Returns</h5> 1727 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1728 </li></ul> 1729 </div> 1730 1731 </div> 1732 </div> 1733 1734 1735 <A NAME="zoomOut()"></A> 1736 1737 <div class="jd-details api apilevel-"> 1738 <h4 class="jd-details-title"> 1739 <span class="normal"> 1740 public 1741 static 1742 1743 1744 1745 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1746 </span> 1747 <span class="sympad">zoomOut</span> 1748 <span class="normal">()</span> 1749 </h4> 1750 <div class="api-level"> 1751 <div></div> 1752 1753 1754 1755 </div> 1756 <div class="jd-details-descr"> 1757 1758 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that zooms out on the map by moving the viewpoint's height 1759 farther away from the Earth's surface. The zoom increment is -1.0.</p></div> 1760 <div class="jd-tagdata"> 1761 <h5 class="jd-tagtitle">Returns</h5> 1762 <ul class="nolist"><li>a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> containing the transformation. 1763 </li></ul> 1764 </div> 1765 1766 </div> 1767 </div> 1768 1769 1770 <A NAME="zoomTo(float)"></A> 1771 1772 <div class="jd-details api apilevel-"> 1773 <h4 class="jd-details-title"> 1774 <span class="normal"> 1775 public 1776 static 1777 1778 1779 1780 <a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a> 1781 </span> 1782 <span class="sympad">zoomTo</span> 1783 <span class="normal">(float zoom)</span> 1784 </h4> 1785 <div class="api-level"> 1786 <div></div> 1787 1788 1789 1790 </div> 1791 <div class="jd-details-descr"> 1792 1793 <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/maps/CameraUpdate.html">CameraUpdate</a></code> that moves the camera viewpoint to a particular zoom level.</p></div> 1794 <div class="jd-tagdata"> 1795 <h5 class="jd-tagtitle">Parameters</h5> 1796 <table class="jd-tagtable"> 1797 <tr> 1798 <th>zoom</td> 1799 <td>the desired zoom level, in the range of 2.0 to 21.0. Values below this range are 1800 set to 2.0, and values above it are set to 21.0. Increase the value to zoom in. 1801 Not all areas have tiles at the largest zoom levels. 1802 </td> 1803 </tr> 1804 </table> 1805 </div> 1806 1807 </div> 1808 </div> 1809 1810 1811 1812 1813 1814 <!-- ========= METHOD DETAIL ======== --> 1815 1816 1817 1818 <!-- ========= END OF CLASS DATA ========= --> 1819 <A NAME="navbar_top"></A> 1820 1821 <div id="footer" class="wrap" > 1822 1823 1824 <div id="copyright"> 1825 1826 Except as noted, this content is licensed under <a 1827 href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. 1828 For details and restrictions, see the <a href="/license.html"> 1829 Content License</a>. 1830 </div> 1831 <div id="build_info"> 1832 1833 <script src="/timestamp.js" type="text/javascript"></script> 1834 <script>document.write(BUILD_TIMESTAMP)</script> 1835 1836 </div> 1837 1838 1839 <div id="footerlinks"> 1840 1841 <p> 1842 <a href="/about/index.html">About Android</a> | 1843 <a href="/legal.html">Legal</a> | 1844 <a href="/support.html">Support</a> 1845 </p> 1846 </div> 1847 1848 </div> <!-- end footer --> 1849 </div> <!-- jd-content --> 1850 1851 </div><!-- end doc-content --> 1852 1853 </div> <!-- end body-content --> 1854 1855 1856 1857 1858 1859 1860 </body> 1861 </html> 1862