The incorporation of Ajax-based geographical mapping applications, like the popular Yahoo! Maps, into an existing website can help to increase the number of potential visitors. So, if you're a web developer who wants to boost your web site's traffic by working with this powerful Yahoo! Ajax framework, or if you simply want to expand your skills in using its main features, then this series of articles might be what you're looking for.
A Closer Look at Smart Markers with Yahoo! Maps - Inserting smart markers into a satellite map (Page 2 of 4 )
As I expressed in the introduction, the goal of this particular tutorial is to demonstrate how to incorporate diverse smart markers into different Yahoo! Maps. So bearing this in mind, I’m going to start by showing you a concrete example where these markers are displayed on a satellite-based map.
This being said, please have a close look at the following code sample:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<title>Example on using smart markers with satellite YAHOO! Map</title>
And finally, you should pay careful attention first to the way that smart markers are turned into “auto expandable” elements via the use of the corresponding “addAutoExpand()” method, and second to the manner in which they’re displayed on the selected map, which in this case was by using a dynamic box, called “smartWindow.” This can be hidden and shown alternatively in response to specific events, like mouse clicks, for instance.
Of course, the characteristic that turns a basic marker into a smart one is its capacity to include additional markup on its own. In the previous example, I decided to include an extra paragraph in each marker, but you can use other tags that probably will better suit your personal needs.
In either case, the functionality of smart markers will be best understood if you have a look at the following image, which demonstrates how they work. Here it is:
So far, so good. At this point, you hopefully learned the key concepts surrounding the incorporation of a few smart markers into a satellite Yahoo! Map. So, what’s next? Well, in the upcoming section of this tutorial, I’m going to teach you how to utilize the same smart markers that you learned earlier, but this time in conjunction with a regional map.
To see how this process will be achieved, please click on the link that appears below and keep reading.