Welcome to the third chapter of the series “Working with Yahoo! Maps.” If you’re an enthusiastic web developer who wants to incorporate these powerful interactive maps into your own web site, then in this article series, you’ll find a step-by-step guide on how to implement their features, including numerous hands-on examples.
Having already introduced the main subject of this series, I’d like to spend a few moments refreshing the topics that were discussed in the last article. It will surely help you understand how the contents of that particular article can be linked with the themes that I plan to explore in this one.
As you’ll possibly recall, in the preceding article of the series, I showed you how to expand the functionality of an existing Yahoo! Map by adding a pair of zoom controls to it via the “addLongZoom()” and “addShortZoom()” methods, which belong to the “YMap” that you learned in earlier tutorials.
Indeed, incorporating these handy zoom controls make these interactive maps even more usable and efficient, since they’re a fundamental feature of the overall Yahoo! Map framework. Hence, they can’t be omitted when building the maps in question.
However, the aforementioned Yahoo! Map framework comes equipped with many other features that can be really helpful when constructing different types of maps. In the previous article, you learned how to provide a selected map with the capacity for zooming in and out over selected geographical locations using both short and long zoom controls. The next feature that should be added to those maps is undoubtedly the ability to scroll over any targeted location using a typical set of “up/down/left/right" buttons.
What I’m talking about here is incorporating a pan mechanism into the maps. Of course, the good news is that any Yahoo! Map supports the inclusion of pan controls. So in the next few lines, I’m going to show you how to add these controls to an existing Yahoo! Map with minor hassles.
Are you ready to see how to incorporate pan capabilities to a selected map? Great, let’s begin now!