Remove Controls for Satellite/Map/Terrain

7,739 views
Skip to first unread message

hknight

unread,
Jun 15, 2011, 8:09:34 PM6/15/11
to Google Maps JavaScript API v3
My map has a control on it where the visitor may change the view to a
Satellite/Map/Terrain view.

How can I remove that control?


Here is the code for my map:
https://sites.google.com/site/adsffadsf/Home/mapv3.txt



-----------------------------------


<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /
>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Info Window Simple</
title>
<style type="text/css">
#map_canvas{
margin: 100px auto 0 auto;
width: 300px;
height: 300px;
border: 1px solid #333;
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=false"></script>
<script type="text/javascript">
function initialize() {
var myLatlng = new google.maps.LatLng(35.005,-78);
var myOptions = {
zoom: 17,
center: myLatlng,
streetViewControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
}

var map = new
google.maps.Map(document.getElementById("map_canvas"), myOptions);
var contentString = '<div id="balloon"><h1>Hello</h1></div>';
var infowindow = new google.maps.InfoWindow({
content: contentString
});

var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Hello'
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
}

</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
</body>
</html>

Rossko

unread,
Jun 16, 2011, 5:33:31 AM6/16/11
to Google Maps JavaScript API v3
Reply all
Reply to author
Forward
0 new messages