GWT AdsManager 未在地图上显示广告
这是我的代码:
AdsManagerOptions options = AdsManagerOptions.newInstance();
options.setMaxAdsOnMap(1);
AdsManager ads = AdsManager.newInstance(map, "google");
ads.setEnabled(true);
我尝试在将地图添加到面板之前、将地图添加到面板之后以及我能想到的任何其他方式进行此操作,这可能是有意义的。我的发布商 ID 是“google”,因为我尚未获得 AdSense 批准,但我尝试采用真实的发布商 ID,但得到了相同的结果。
让我有点困惑的是,AdsManager 不是一个小部件,所以我无法选择要将其放置在地图上的位置。我读过这实际上是它的工作原理,但我见过像 http://mapper.acme.com/ 广告不在典型的右下角。
有人可以告诉我我做错了什么吗,因为这让我发疯!谢谢!
我还是没有答案。我现在正在尝试使用合法的发布商 ID,因此我知道无效的发布商 ID 并不是让我感到沮丧的原因。有人有什么想法吗?
Here's my code:
AdsManagerOptions options = AdsManagerOptions.newInstance();
options.setMaxAdsOnMap(1);
AdsManager ads = AdsManager.newInstance(map, "google");
ads.setEnabled(true);
I tried doing this before the map is added to a panel, after a map is added to a panel, and any other way i could think of that could possibly make sense. My publisher id is "google" because I havent been approved for adsense yet, but ive tried taking a real publisher id and i got the same result.
What is confusing me a bit, is that the AdsManager isnt a widget, so I cant choose where i want to place it on the map. Ive read that this is actually how it works, but ive seen sites like http://mapper.acme.com/ where the ads are not in the typical bottom right corner.
Can someone PLEASE enlighten me on what I am doing wrong because this is driving me mad! Thanks!
I still have no answer. I am now trying with a legitimate publisher ID so I know that an invalid publisher id wasnt the reason for my frustrations. Anyone have any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用的是火狐浏览器吗?如果是的话,你有adblock吗?或者您的浏览器上有其他广告拦截器吗?
也有可能您正在查看的区域没有任何广告...尝试放大到像纽约这样的地方...
Are you using firefox? If yes, do you have adblock on? Or any other adblocker on your browser?
Its also possible that the region you're looking at doesn't have any ads... Try zooming into a place like New York...