-1
時dragend地圖(但工作,如果dragend標記),我不能讓地址獲取地址時,地圖移動
google.maps.event.addListener(map, 'dragend', function(event) {
myMarker.setPosition(this.getCenter()); // set marker position to map center
updatePosition(this.getCenter().lat(), this.getCenter().lng());
的jsfiddle
工程就像一個魅力..謝謝! ,我可以爲中心地圖的搜索地址添加輸入類型=「文本」嗎? – Edofx
@Edofx沒有得到你能解釋嗎? –
檢查小提琴http://jsfiddle.net/bt4dmu1f/,在搜索框,可以輸入地址,如果找到了,地圖地址居中。 – Edofx