如果我的标记在ajax成功时每个结果都会被填充,我该如何为它们添加标签?
map.gmap('addMarker', { 'position': new google.maps.LatLng(result.latitude, result.longitude) });
我试过这样做,但没有成功:map.gmap('addMarker', {
'position': new google.maps.LatLng(result.latitude, result.longitude),
'bounds': true,
'icon': markerIcon,
'labelContent': 'A',
'labelAnchor': new google.maps.Point(result.latitude, result.longitude),
'labelClass': 'labels', // the CSS class for the label
'labelInBackground': false
});