function initMap() {
var uluru = {lat: 13.676442, lng: 100.638276};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 17,
center: uluru
});
var marker = new google.maps.Marker({
position: uluru,
map: map,
label: {
text: "$300k",
color: "#4682B4",
fontSize: "30px",
fontWeight: "bold"
},
title: "Hello World!",
visible: true
});
}
我想自定義的標籤。我試圖找到在谷歌文檔中的答案,他們只有幾個屬性改變(https://developers.google.com/maps/documentation/javascript/3.exp/reference#MarkerOptions),然後我搜索谷歌最多的答案是MarkerWithLabel但問題是鏈接不工作更多http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.9/src/markerwithlabel.js「所以我不能使用庫。我將圖片從我的代碼和我想要的東西。任何一個能幫助我嗎?
Google harder ... https://developers.google.com/maps/documentation/javascript/custom-markers – Darkrum
設置標記的標題爲price.var marker = new google.maps.Marker({ 位置:myLatlng, title:「Hello World!」 }); – sonali