您可以在下面看到我的显示地图和标记的代码(来自 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
谢谢你的帮助!