0
Google지도의 모든지도 유형을 사용하고 싶습니다. 그러나 한 번에 한 번만 설정할 수 있습니다. 어쨌든 하나의지도에 대해 모든지도 유형을 설정할 수 있습니다.Google지도에서 모든지도 유형을 사용하는 방법
지금 저는 roadmap.how를 사용하고 있습니다. 모든지도 유형을 사용할 수 있습니다. 중인 MyOptions은 다음과 같은 옵션을 드 추가 VAR에서
var geo = new google.maps.Geocoder;
geo.geocode({ 'address': address }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var myLatLngh = results[0].geometry.location;
var myOptions = {
center: myLatLngh,
zoom: 12,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var marker = new google.maps.Marker({
position: myLatLngh,
title: address
});
marker.setMap(map);
var infowindow = new google.maps.InfoWindow({ content: "<b>Company Address</b><br/> " + address });
infowindow.open(map, marker);
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});