JavaScript
  Home arrow JavaScript arrow Adding Zoom Controls to Yahoo! Maps
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Adding Zoom Controls to Yahoo! Maps
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-04-08

    Table of Contents:
  • Adding Zoom Controls to Yahoo! Maps
  • A quick review: building different types of Yahoo! Maps
  • Adding a long zoom control to Yahoo! Maps
  • Using a short zoom control with Yahoo! Maps

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Adding Zoom Controls to Yahoo! Maps
    (Page 1 of 4 )

    Welcome to the second part of the series “Working with Yahoo! Maps.” As the title clearly suggests, this series provides you with all the elements that you will need to start utilizing the Yahoo! Maps Ajax-based framework. It complements theoretical explanations with numerous code samples. This article will discuss how to incorporate zoom controls into an existing Yahoo! Map.

    These days, the web has plenty of sites that use a huge variety of Ajax-based applications to keep their visitors engaged. And you can ride this exciting wave effortlessly if you learn how to incorporate Yahoo! Maps into your own website. However, to dig into the depths of this topic, you’ll need to have a step-by-step guide. So don’t waste your valuable time; start reading this article series!

    If you already read the first article of the series, it's time to recapitulate the topics that were discussed in that particular tutorial. Doing so will give you a much clearer idea on how these items can be linked with the ones that I plan to cover in this second installment.

    You’ll surely recall from the last article that I explained how to build the three basic types of maps supported by this Yahoo! Ajax framework (i.e. regional, satellite and hybrid respectively) by using the “YMap” JavaScript class in conjunction with some of its handy methods, such as “setMapType()” and “drawZoomAndCenter()”.

    Basically, the aforementioned methods permitted me to include these three types of Yahoo! Maps into a sample web document by specifying a simple containing DIV, which was responsible for positioning each of the maps in question within a web page. Also, in all the cases, I used the city of Los Angeles as the default geographical location being displayed by the maps, but as you know, this option can be modified to work with different places.

    All right, at this time building basic Yahoo! Maps using the JavaScript methods already mentioned should be a familiar process to you. So with that idea in mind, it’s time to talk about the topics that will be discussed in this second article of the series. Simply put, in the next few lines I’m going to show you how to incorporate different types of zoom controls into an existing Yahoo! Map, expanding its current functionality.

    A typical Yahoo! Map supports two basic zoom controls, “short” and “long.” Both of them have exactly the same function. However, they actually look pretty different, so I’m going to create some concrete examples for you to see how to work directly with each type.

    With the preliminaries out of way, it’s time to show some action. Let’s learn how to add some zoom controls to a selected Yahoo! Map.

    More JavaScript Articles
    More By Alejandro Gervasio


       · Yahoo! Maps support working with two basic zoom controls, called "short" and "long"...
     

    JAVASCRIPT ARTICLES

    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...
    - Bulleted Menu of Links
    - Creating Click Loggers and Basic Markers wit...
    - Adding Pan Controls to Yahoo! Maps
    - Adding Zoom Controls to Yahoo! Maps
    - Working with Yahoo! Maps
    - Building Image Zooming Controls with the DOM...
    - Working with Multiple Graphics for a Zoom Ap...
    - Improving an Image Zooming Application with ...
    - Zooming in on Images with JavaScript
    - JavaScript Date Objects: Universal Coordinat...
    - Javascript Objects: More Date Methods
    - JavaScript Objects: Dates
    - JavaScript Objects: Finishing Strings

    Iron Speed





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway