【发布时间】:2013-09-08 20:39:15
【问题描述】:
您可以在下面看到我的显示地图和标记的代码(来自 Json):
$('#map_canvas').gmap().bind('init', function() {
$.getJSON( '../js/locate.php', function(data) {
$.each( data.markers, function(i, marker) {
var mapvalue=new google.maps.LatLng(marker.latitude, marker.longitude);
$('#map_canvas').gmap('addMarker', {
'tags': [''+marker.category+''],
'position': mapvalue,
'bounds': true,
'icon':'../images/'+marker.category+'.png',
'animation':google.maps.Animation.DROP
}).click(function() {
$('#map_canvas').gmap('openInfoWindow', { 'content': ''+marker.category+'<BR><div id="cust_content"></div>' }, this);
setTimeout("opencust(\'" +marker.id+"\');",100);
});
});
});
});
如何在我的地图中包含新的 adsense 脚本:https://developers.google.com/maps/documentation/javascript/advertising#AdvertisingAdUnit
感谢您的帮助!
【问题讨论】:
-
你想在这里做什么?
-
我只是想在我的地图上添加一个 AdSense 广告。使用谷歌脚本很容易,但我找不到将它与 jquery-ui-map 库一起使用的方法。
标签: jquery google-maps adsense