开发者

google maps adsense adunit style

开发者 https://www.devze.com 2023-03-06 00:46 出处:网络
I\'m trying to figure out how to stylize (I really just want to change colors) the adUnit created through google maps V3. Is there no standard way to do this? most adsense ads you can stylize internal

I'm trying to figure out how to stylize (I really just want to change colors) the adUnit created through google maps V3. Is there no standard way to do this? most adsense ads you can stylize internally, but it is looking to me like I am stuck with the开发者_开发技巧 ugly blue background.

It seems like there should be a way to do this, given that you are now able to place the maps adunits outside of the map. Thanks!


I also searched for a solution, none found. I think they don't want you to mess with the colors, it has to blend nicely with the map colors itself.


https://developers.google.com/maps/documentation/javascript/advertising?hl=en#AdUnitAdStyles

  var adUnitDiv = document.createElement('div');
   var adUnitOptions = {
     format: google.maps.adsense.AdFormat.HALF_BANNER,
     position: google.maps.ControlPosition.TOP,
     backgroundColor: '#c4d4f3',
     borderColor: '#e5ecf9',
     titleColor: '#0000cc',
     textColor: '#000000',
     urlColor: '#009900',
     map: map,
     visible: true,
     publisherId: 'YOUR_PUBLISHER_ID'
   }
   adUnit = new google.maps.adsense.AdUnit(adUnitDiv, adUnitOptions);

Is this what you needet?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号