Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
133
rated 0 times [  138] [ 5]  / answers: 1 / hits: 40914  / 13 Years ago, fri, june 10, 2011, 12:00:00

I am trying to remove all the controls (zoom, map type drop down, and street view) from my map.



There's a method



map.removeControl(GControl)


but I haven't been able to successfully remove any default ones that I hadn't added myself.



Any tips on remove/clearing all controls from the map?


More From » google-maps

 Answers
20

Have you tried this:



http://code.google.com/apis/maps/documentation/javascript/controls.html#DisablingDefaults



function initialize() {
var myOptions = {
zoom: 4,
center: new google.maps.LatLng(-33, 151),
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById(map_canvas),
myOptions);
}

[#91775] Wednesday, June 8, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kieraelsies

Total Points: 718
Total Questions: 103
Total Answers: 104

Location: England
Member since Sun, May 21, 2023
1 Year ago
kieraelsies questions
Tue, Aug 3, 21, 00:00, 3 Years ago
Tue, Feb 23, 21, 00:00, 3 Years ago
Thu, Nov 12, 20, 00:00, 4 Years ago
Wed, Sep 9, 20, 00:00, 4 Years ago
Mon, Sep 16, 19, 00:00, 5 Years ago
;