Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8494463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:18:20+00:00 2026-06-10T23:18:20+00:00

This is my javaScript code. (function() { window.onload = function() { // Creating a

  • 0

This is my javaScript code.

(function() {
      window.onload = function() {

    // Creating a reference to the mapDiv
    var mapDiv = document.getElementById('map');

    // Creating a latLng for the center of the map
    var latlng = new google.maps.LatLng(37.09, -95.71);

    // Creating an object literal containing the properties 
    // we want to pass to the map  
    var options = {
      center: latlng,
      zoom: 2,   
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    // Creating the map
    var map = new google.maps.Map(mapDiv, options);
  }
})();

When i add the disableDefaultUI: true to the options variable and test it on my Browsers(Opera,Firefox,Chrome Canary) it does not disable the UI. I am currently using Eclipse Indigo on My Mac OSX version 10.6.8. Is there a problem with my browsers cache or something? My code seems to be okay. I can’t understand why it does not render on the browsers.

var options = { 
zoom: 3,
center: new google.maps.LatLng(37.09, -95.71),
 mapTypeId: google.maps.MapTypeId.ROADMAP, 
 disableDefaultUI: true
};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:18:21+00:00Added an answer on June 10, 2026 at 11:18 pm

    I can’t remember exactly why the disableDefaultUI property didn’t do anything on maps I’ve worked on recently. The way I got round it was to control each ui element directly.

    var options = {
        // Required map properties here
    
        // Set how Zoom is to look
        zoomControl : true,
        zoomControlOptions : {
            style : google.maps.ZoomControlStyle.SMALL,
            position : google.maps.ControlPosition.TOP_LEFT
        }
    }
    

    While the example above modifies the Zoom controls to the compact plus and minus rather than slider, you can turn if off using:

    zoomControl : false
    

    All the other UI elements have these type of controls also. You can see them all here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this javascript code <Script> function getGroupId(){ var group=document.getElementById(selectedOptions).value; var groupFirstLetter=group.substring(2); } </Script>
This is my JavaScript code: <script> function change(name){ var element = document.all.name.value; } </script>
My javascript code is like this: function openWindows() { if(A is true) { window.open(URL_A);
Consider this (rather pointless) javascript code: function make_closure() { var x = 123, y
Check out this piece of JavaScript code: (function (w, d) { var loader =
Hello i have this form filling javascript: function onLine(code,nn) { document.writeform.bericht.value+=code; document.writeform.bericht.focus(); document.writeform.nickname.value+=nn; write1();
I made this bookmarklet: javascript:(function(){var s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');document.getElementsByTagName('body')[0].appendChild(s);$('#hldIntMain').hide();$('#fadeBackground').hide();return false;})() Formatted code: // Add in jQuery var
I have the following javascript code: <script type=text/javascript> var x = 10; window.onload =
I have a PHP code: if($billing_total>$limit_to_send){ echo '<script type=text/javascript> window.onload = function() { alert(Sorry,
This Javascript code is using the 'this' keyword inside a nested function (which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.