如何更改嵌入式Google地圖中的引腳標籤?更改google地圖中的pin標籤?
香港專業教育學院想出如何標記改變我的圖標,但我需要再整的A,B,C等類似如何Travelodge酒店做有地圖http://www.travelodge.co.uk/hotels/book/edinburgh-hotels
UPDATE這是成功使用的代碼自定義標記:
function addMarker(latlng, myTitle) {
markers.push(new google.maps.Marker({
position: latlng,
map: map,
title: myTitle,
icon: "www.linkto/myPin.png"
}));
}
伊夫包括markerwithlabel.js然而,這並不在所有創建任何標記:
function addMarker(latlng, myTitle) {
markers.push(new MarkerWithLabel({
position: latlng,
map: map,
title: myTitle,
icon: "www.linkto/myPin.png",
labelContent: "$425K",
labelAnchor: new google.maps.Point(22, 0),
labelClass: "labels",
labelStyle: {opacity: 0.75}
}));
}
這是我的代碼被捆綁適應: http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.8/examples/basic.html
你確定嗎?從看他們的網站,我可以看到針和標籤是分開的圖像。 – Evans 2013-03-08 10:00:13
@jdln我很抱歉,您是對的,我會發布回答 – alestanis 2013-03-08 10:02:16
感謝您的回覆。我試着使用示例中的代碼並按問題更新,但它不起作用。謝謝 – Evans 2013-03-08 11:35:49