How to Hide the Controls in Google Maps

Google Maps provides an embeddable object you can place on your own Web pages. You can use the Google Maps control as part of your own website. The embedded control comes with a default user interface that contains different zoom, pan and map type controls, depending on whether it's accessed from a desktop computer or a mobile device. You can hide these controls, and embed a plain Google Maps object by setting specific JavaScript variables on your Web page.

Instructions

    • 1

      Open your Web page's HTML source code in a text editor.

    • 2

      Locate the "var myOptions = {" line in the source code. Press the "Ctrl" and "F" keys at the same time to open your text editor's search window to search for the line, if necessary.

    • 3

      Add the following text to a new line below the "var myOptions = {" line and above the "};" line.

      disableDefaultUI: true,

    • 4

      Save the Web page's HTML source code file using your text editor, and upload the new copy to your Web host.

Tips & Warnings

  • You can disable specific controls by adding one or more of the following options to the myOptions section:

  • panControl: false,

  • zoomControl: false,

  • mapTypeControl: false,

  • scaleControl: false,

  • streetViewControl: false,

  • overviewMapControl: false,

  • You can also replace "false" with "true" to enable a specific control.

Related Searches:

References

Comments

Related Ads

Featured