場所 (都市または国) を入力し、情報ウィンドウが開いている場合、次のコードは、開いている情報ウィンドウの領域内の場所のみを検索します。
function codeAddress() {
var address = document.getElementById("address").value;
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
map.fitBounds(results[0].geometry.viewport);
} else {
alert("Sorry, we couldn't find the location for the following reason: " + status);
}
});
}
fitBounds なしで位置ビューポートにズームしたい
この種の作品:
map.setZoom(13);
しかし、ズームレベルを指定したくありません
後者のコードからのリンクは次のとおりです: http://www.hostelbars.com/map_test_v3_3.html
助けていただければ幸いです - ありがとう!