0
我在谷歌地圖上使用圖像標記時獲取圖像,但是當我爲infowindow使用相同圖像時,它只顯示url。如何使用靜態資源infowindow setContent?
代碼:
var content = '<div class="map-content"><h3>' + "Account Name: " + "{!acc.Name} " +
'</h3>' + '<b>' +"Location: " + "{!acc.BillingCity}" + '</b>' + '</br>' +
"Direction : " + '<a href="http://maps.google.com/?daddr=' + "{!acc.BillingCity}" +
'" target="_blank">Get Directions</a>' + "{!$Resource.Image_GoogleMap}" +'</div>';
google.maps.event.addListener(marker, 'mouseover', function() {
infowindow.open(map, this);
infowindow.setContent(content);
});
如何使用 「{$ Resource.Image_GoogleMap!}」,以顯示在信息窗口的谷歌地圖圖像。 任何人都可以幫助我嗎?
什麼是''{!$ Resource.Image_GoogleMap}''? –
感謝Joni的快速回復。是的,這是一個圖像的URL,現在它的工作正常,並在infowindow中顯示圖像。 – DINESH