Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[经验] 给你的Google地图插上GG ADSENse内容广告

[复制链接]
fareign 发表于 2010-3-12 10:09:03 | 显示全部楼层 |阅读模式
UCHome插件
语言编码: GBK简体 UTF8简体 BIG5繁体 
插件名称: ooidea.cn
插件作者: fareign
适用版本: UCHome 2.0
本帖最后由 fareign 于 2010-3-12 11:30 编辑

//地图广告植入       
//内容广告
var publisher_id = "";  //你的广告帐号
var adsManagerOptions = {
  maxAdsOnMap : 4,
  style: 'adunit',
  // The channel field is optional - replace this field with a channel number
  // for Google AdSense tracking
  channel: '6471576755'   //渠道ID号
};
adsManager = new GAdsManager(map, publisher_id, adsManagerOptions);
adsManager.enable();       

               
               


弄到里面就行了,


给个演示:

http://www.ooidea.com/space-18-do-position-id-687-op-maps.html
oktime 发表于 2010-3-12 10:51:53 | 显示全部楼层
能说一下具体步骤吗
回复

使用道具 举报

 楼主| fareign 发表于 2010-3-12 11:28:27 | 显示全部楼层
回复 2# oktime


    GG地图不是一有段脚本不?

放到后面就行了。给一段完整的参考。
  1.         <script src=http://ditu.google.com/maps?file=api&v=2&oe=gb2312&key=ABQIAAAAL-FMBWF6kBYRqlv0DLnb0RSgqL7GUxQgvpYFBP4p9Oo-er-OlxSjrs1Ym0CBZxkE27AdQzuazhgNdQ type="text/javascript"></script>
  2.                 <script type="text/javascript">
  3.                         window.onload = function() {
  4.                         if (GBrowserIsCompatible()) {
  5.                         var map = new GMap2(document.getElementById("map"));
  6.                         var center = new GLatLng($position[lat],$position[lng]);
  7.                         map.setCenter(center, $position[zoom]);
  8.                         var marker = new GMarker(center);
  9.                         map.addOverlay(marker);
  10.                         map.addControl(new GLargeMapControl());
  11.                         map.addControl(new GScaleControl());
  12.                         }
  13.         //地图广告植入       
  14. //内容广告
  15. var publisher_id = "";
  16. var adsManagerOptions = {
  17.   maxAdsOnMap : 4,
  18.   style: 'adunit',
  19.   // The channel field is optional - replace this field with a channel number
  20.   // for Google AdSense tracking
  21.   channel: '6471576755'  
  22. };
  23. adsManager = new GAdsManager(map, publisher_id, adsManagerOptions);
  24. adsManager.enable();       

  25.                
  26.                        
  27.                         }



  28.            </script>
复制代码
回复

使用道具 举报

zhougeru 发表于 2010-3-12 11:39:31 | 显示全部楼层
学习了,顶上


http://www.0771ju.com
http://www.youku123.com
回复

使用道具 举报

guanjingla 发表于 2010-3-12 11:46:11 | 显示全部楼层
弄到里面就行了
回复

使用道具 举报

 楼主| fareign 发表于 2010-3-12 15:05:40 | 显示全部楼层
回复

使用道具 举报

GGGHHH 发表于 2010-3-12 21:57:57 | 显示全部楼层
记号。。。
回复

使用道具 举报

 楼主| fareign 发表于 2010-3-13 07:15:44 | 显示全部楼层
回复

使用道具 举报

sujian919 发表于 2010-3-16 08:22:06 | 显示全部楼层
做个记号。
回复

使用道具 举报

136468936 发表于 2010-3-16 22:43:53 | 显示全部楼层
好家伙……
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-16 03:13 , Processed in 0.112606 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表