我有问题,标签将保持黑色即使与JavaScript中的labelColor属性,但我想它是白色有没有办法做到这一点?也许是一种解决方法?如何更改标记标签的文字颜色?
for (i = 0; i < locations.length; i++) {var myLatLng = new google.maps.LatLng(locations[i][1], locations[i][2]);
marker = new google.maps.Marker({
position: myLatLng,
map: map,
label: labels[i],
labelClass: "labels", // the CSS class for the label
labelColor: '#fff',
labelInBackground: false,
icon: locations[i][4]
});
问题是我有我想要使用的自定义图标,我不想先创建一些SVG。 感谢任何能帮助我的人。
谢谢@geocodezip对我来说非常完美:)。 – Johannes