0
試圖觸發在infowindow..i事件有以下內容字符串谷歌,地圖:觸發事件在信息窗口
var contentString = '<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<h2 id="firstHeading" class="firstHeading">'+data.name+'</h2>'+
'<div id="bodyContent">'+
'<p>'+data.address+'</p>'+
'<p></p>'+
'<p>Do You Want to change search location</p>'+
'<input type="button" value="click me" onclick="alert(\"infoWindow\")">'+
'</div>'+
'</div>';
這裏提醒語句是沒有triggering..Actually我需要實現一個事件每當我按一下按鈕我需要到特定的座標存儲到本地存儲 任何建議,將不勝感激
喜出現錯誤無法調用未定義的方法'getPosition' – teekib
getPosition是標記類的一種方法,請參閱https:// developers.google.com/maps/documentation/javascript/reference#Marker。因爲我沒有辦法知道你的標記被稱爲我使用的'標記' –
嗨它說在這裏意想不到的問題:var lat =「+ latlng.lat(); ..有什麼不對嗎? – teekib