以下是打開infoWindow時的樣子。如何在打開infoWindow時將其放置在右上角,並有任何方式將其設置爲純矩形。在Google地圖上定位infoWindow
我的代碼看起來象
var getDirection = new google.maps.InfoWindow({
content: ''
});
var html ='<address><br>'+fromAddress+'</address><p>get directions from:</p><input id="from_Address" type="text" required><button id="go">Go</button><p><br><p id="error_msg" style="color:red;"></p><br>example: 121 belved Rd CA'
getDirection.setContent(html);
getDirection.open(resultsMap);
請幫助。
請檢查:https://developers.google.com/maps/documentation/javascript/infowindows – Microsmsm
謝謝它將有所幫助 –
使用第二個參數('anchor'參數)'打開(map?:Map | StreetViewPanorama,錨?:MVCObject)'或設置InfoWindow的位置。請提供一個[最小,完整,測試和可讀的示例](http://stackoverflow.com/help/mcve)來解決問題。 – geocodezip