The Lat49 object primarily acts as a container for the Lat49 name space. All methods and data are accessed through the Lat49 object. Not only does it hold the classes and objects that do the work of fetching and displaying ads, it also has a few public methods that make showing ads within an HTML document a little easier. The Lat49 object can manage its own Lat49.AdHelper object, and it has some public methods that use that object to reduce the amount of scripting required to show ads. These public methods are described below.
Functions in class Lat49:
| Lat49.initAds(publisherID); | ||
This method creates the internally managed Lat49.AdHelper object (see Section 4.2 for information), and passes publisherID to it. This method also calls Lat49.fetchCSS() to retrieve the necessary CSS scripts. N.B. If this method is not called, perhaps because the internally managed Lat49.AdHelper object is not required, then the application should call the Lat49.fetchCSS() method itself to ensure that the ads are displayed properly. | ||
| Lat49.AdHelper Lat49.getAdHelper(i); | ||
Returns the i'th Lat49.AdHelper object that was created. If i is not specified, then the first object is returned. This method can be used to get the internally managed object created by Lat49.initAds(). | ||
| Lat49.updateAdByLatLon(divId, lat, lon, zoomlevel); | ||
Convenience method that calls the internally managed Lat49.AdHelper object's method of the same name. See the documentation for Lat49.AdHelper.updateAdByLatLon() in Section 4.2 for an explanation of the parameters. | ||
| Lat49.updateAdByTile(divId, x, y, zoomlevel); | ||
Convenience method that calls the internally managed Lat49.AdHelper object's method of the same name. See the documentation for Lat49.AdHelper.updateAdByTile() in Section 4.2 for an explanation of the parameters. | ||
| Lat49.fetchCSS(); | ||
Fetches the CSS script defining how ads are laid out and adds it to the document head. This method is called by the Lat49.initAds() method. If the latter method is not called, then fetchCSS should be explicitly called by the publisher to ensure that the ads are properly displayed. | ||