3 Easy Steps to add Lat49 Ads to your Map Mashup

What is Lat49?

Google Maps | Windows Live Maps | Yahoo AJAX Maps

Add Lat49 API: Include the Lat49 API script in the head of the document
<script src="http://adserver.lat49.com/lat49/v0.10/lat49.js" type="text/javascript"></script>
Integrate Lat49 API with Maps API: Include the function to display Lat49 ads and use a Map Event Listener to call the function to display Lat49 Ads within script tag. Replace the PUBLISHER_ID with your actual Lat49 publisher ID
GEvent.addListener(map, "moveend", showLat49Ads);

function showLat49Ads(){
  Lat49.initAds(PUBLISHER_ID);
  var center = map.getCenter();
  var lat = center.lat();
  var lng = center.lng();
  var zoomlevel = Lat49.Tile.convertGMap2Zoom(map.getZoom());
  Lat49.updateAdByLatLon("adcontainer", lat, lng, zoomlevel);
}
Setup Map containter: Replace the existing 'map' DIV container with a DIV container that has containers for both 'map' and 'ads'. Different Ad position can be specified by using the lat49adposition attribute, refer to Lat49 API Documentation for more details. Use appropriate height and width for the 'main' DIV container, same as what was used for the map container previously.
<div id="map" style="width:700px; height:500px;"></div>
Replace the above code with the one below:
<div id="main" style="position:relative; width:700px; height:500px;">
  <div id="adcontainer" lat49adposition="bottom-right" style="position:absolute;right:10px;bottom:20px;width:242;height:133;z-index:99999;"></div>
  <div id="map" style="width:100%; height:100%"></div>
</div>