Creating Click Loggers and Basic Markers with Yahoo! Maps
(Page 1 of 4 )
This is the fourth part of the series “Working with Yahoo! Maps.” If you’re a web developer who’s interested in learning the key concepts surrounding the utilization of Yahoo! Maps within the context of your web applications, then this article series might be for you. In it you’ll find comprehensive examples that will let you put this useful Ajax framework to work for you in a very short time.
The race between large web search companies, like Google and Yahoo!, that aim to provide both web surfers and developers with robust geographical mapping applications still has a long way to go. Meanwhile, you can spend your time learning the basics of how to work with Yahoo! Maps' Ajax framework, which incorporates numerous features into your web sites and keeps visitors coming back for more.
Now that I've introduced you to the main subject of this series, I’m going to spend a few moments reviewing the topics that were discussed in the last tutorial. This way you’ll have a much better idea of how the contents deployed in that specific article are related to what I plan to teach you in this fourth chapter of the series.
Having said that, you’ll certainly remember that in the previous article I showed you how to use the handy “addPanControl()” method, which belongs to the “YMap” JavaScript class, to construct several Yahoo! Maps that featured an effective panoramic control comprised of four tiny arrows. The reason for incorporating this pan control into the map was to provide it with the capacity to scroll all over a predefined geographical location by clicking on these small arrows.
In addition to showing you how to construct a Yahoo! map that displays the pan control, I coded an illustrative example that combined the functionality of the panoramic mechanism with the short zoom control that you learned in previous tutorials.
So far, so good. Hopefully by now, all these helpful features offered by the Yahoo! Map framework are familiar to you. So it’s time to talk about the topics that I’m going to discuss in the next few lines. I’m going to show you how to develop a simple application that allows you to intercept all the mouse clicks that have occurred in a selected map. And then, based on this click detection mechanism, I’ll teach you how to add some basic markers as the map in question is being clicked on. Quite interesting, right?
Let’s continue exploring the details of how this powerful Yahoo! Map Ajax framework works. Let’s start this journey now!
Next: Review: adding zoom and pan control to a single Yahoo! Map >>
More JavaScript Articles
More By Alejandro Gervasio