Disabling The Default Controls on Google Map

Google Maps – Disabling The Default Controls

You may instead wish to turn off the default controls.

To do so, set the Map’s disableDefaultUI property (within the Map options object) to true. Here the code is :

<!DOCTYPE html>

function initialize()
var mapProp = {
center: new google.maps.LatLng(51.508742,-0.120850),
mapTypeId: google.maps.MapTypeId.ROADMAP
var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
google.maps.event.addDomListener(window, 'load', initialize);

<div id="googleMap" style="width:500px;height:380px;"></div>

Output :


Pankaj Singh Sugara

Author Pankaj Singh Sugara

Experienced Software Engineer with a demonstrated history of working in the marketing and advertising industry. Skilled in SQL, Web Applications, PHP, WordPress, and Joomla. Strong engineering professional with a B-TECH focused in Information Technology from JCDM College of Engineering Sirsa, Haryana.

More posts by Pankaj Singh Sugara