Google AdSense for Maps地图广告
2009-08-15 10:16
537 查看
地图应用是一项热门的网络服务,很多本地信息类网站,比如旅游,房屋租赁,餐饮信息等,都是使用Google Maps API来实现地图服务的,那么这些地图类网站如何通过地图服务来获取收益呢?可以通过Google AdSense for Maps来实现地图广告显示。
Google AdSense for Maps有两种广告显示格式,一种是搜索类广告,一种是内容类广告,这很类似于Google的搜索联盟和内容广告。Google在地图API的文档中讲述了这两类地图广告的代码设置方法。
1、搜索类广告
这类广告是在搜索内容结果中显示广告,需要使用GoogleBar的功能,首先将你的publisher ID放在client内容里,然后将渠道的id号码放在channel中,下面是一个通过GoogleBar实现地图搜索广告的代码,在实际使用的时候,你要将你的publisher ID替换代码里的client内容。
var map;
if (GBrowserIsCompatible()) {
var mapOptions = {
googleBarOptions : {
style : "new",
adsOptions: {
client: "partner-google-maps-api",
channel: "AdSense for Search channel",
adsafe: "high",
language: "en"
}
}
}
map = new GMap2(document.getElementById("map_canvas"), mapOptions);
map.setCenter(new GLatLng(33.956461,-118.396225), 13);
map.setUIToDefault();
map.enableGoogleBar();
}
点击这里查看该广告详细的参数含义(英文)。
2、内容类广告
这类广告在地图上显示一个类似AdSense内容类的文字广告,广告使用了GAdsManager结构,你要将你的publisher ID和channel ID加入到GAdsManager,就可以显示广告,目前这类广告的样式似乎无法自定义,下面是内容类地图广告的演示代码。
var publisher_id = yourPublisherID;
var adsManagerOptions = {
maxAdsOnMap : 2,
style: 'adunit',
// The channel field is optional - replace this field with a channel number
// for Google AdSense tracking
channel: 'your_channel_id'
};
adsManager = new GAdsManager(map, publisher_id, adsManagerOptions);
adsManager.enable();
点击这里查看该广告详细的参数含义(英文)。
上图是该广告的实际显示效果,该广告的背景色是淡蓝色,无法调整,广告尺寸也无法调整,感觉样式不是特别好看,广告内容好像是和地理坐标位置相匹配,例如在深圳上海宾馆的坐标,就显示服装批发和订票等广告。目前只有文字广告,没有看到多媒体广告。
Google AdSense for Maps有两种广告显示格式,一种是搜索类广告,一种是内容类广告,这很类似于Google的搜索联盟和内容广告。Google在地图API的文档中讲述了这两类地图广告的代码设置方法。
1、搜索类广告
这类广告是在搜索内容结果中显示广告,需要使用GoogleBar的功能,首先将你的publisher ID放在client内容里,然后将渠道的id号码放在channel中,下面是一个通过GoogleBar实现地图搜索广告的代码,在实际使用的时候,你要将你的publisher ID替换代码里的client内容。
var map;
if (GBrowserIsCompatible()) {
var mapOptions = {
googleBarOptions : {
style : "new",
adsOptions: {
client: "partner-google-maps-api",
channel: "AdSense for Search channel",
adsafe: "high",
language: "en"
}
}
}
map = new GMap2(document.getElementById("map_canvas"), mapOptions);
map.setCenter(new GLatLng(33.956461,-118.396225), 13);
map.setUIToDefault();
map.enableGoogleBar();
}
点击这里查看该广告详细的参数含义(英文)。
2、内容类广告
这类广告在地图上显示一个类似AdSense内容类的文字广告,广告使用了GAdsManager结构,你要将你的publisher ID和channel ID加入到GAdsManager,就可以显示广告,目前这类广告的样式似乎无法自定义,下面是内容类地图广告的演示代码。
var publisher_id = yourPublisherID;
var adsManagerOptions = {
maxAdsOnMap : 2,
style: 'adunit',
// The channel field is optional - replace this field with a channel number
// for Google AdSense tracking
channel: 'your_channel_id'
};
adsManager = new GAdsManager(map, publisher_id, adsManagerOptions);
adsManager.enable();
点击这里查看该广告详细的参数含义(英文)。
上图是该广告的实际显示效果,该广告的背景色是淡蓝色,无法调整,广告尺寸也无法调整,感觉样式不是特别好看,广告内容好像是和地理坐标位置相匹配,例如在深圳上海宾馆的坐标,就显示服装批发和订票等广告。目前只有文字广告,没有看到多媒体广告。
相关文章推荐
- 在csdn博客文章中加入google广告代码(adsense for content)
- 谷歌推出企业版地图服务Google Maps Engine Pro
- Google发布中文版AdSense for domains
- Sign Up for the Google Maps API——Google 地图 API 文档之四
- Google AdSense For Dummies
- 用google maps api在网站上显示指定坐标的地图
- Adsense搜索广告和Google搜索联盟
- Google Maps API指南:设置地图选项
- Google AdSense for Games开始测试
- Dynamically Loading Google Maps for Performance
- 基于Google Maps API的地图应用开发
- 对GOOGLE sitemap.xml网络地图的添加for asp.net1.1
- Drive More Search Traffic to Your Maps API Site by Including KML Files in a Sitemap——Google 地图 API 文档之五
- 在线地图贴广告,Google地图(Maps)将会提供广告
- ArcGIS api for flex读取下载到本机的google瓦片地图 web墨卡托投影
- Google Maps API Exampless——Google 地图 API 文档之六
- Google 地图 API for Android
- Arcgis for flex 给Google卫星地图加上地点名(道路图层)
- Google发布AdSense for Feeds
- Google Maps Control for ASP.Net - Part 2 (转载)