title: How to set google.maps.Map options while preserving the previous settings?
body: <p>I have a system using google maps api v3, the system is quite big with various javascript modules that I load. Now I found a tricky thing: if I set the map options with setOptions, previous setting is deleted:</p>
  
  <p>I.e., if one of my modules needs to change the position of the map selector:</p>
  
  <pre><code>my_map.setOptions({ mapTypeControlOptions: 
        { position: google.maps.ControlPosition.TOP_RIGHT }
  });
  </code></pre>
  
  <p>it will reset settings of another module, which is adding new map types!! :</p>
  
  <pre><code>my_map.setOptions({ mapTypeControlOptions: {
                              mapTypeIds: [
                                      google.maps.MapTypeId.ROADMAP,
                                      google.maps.MapTypeId.SATELLITE,
                                      google.maps.MapTypeId.HYBRID,
                                      google.maps.MapTypeId.TERRAIN,
                                      'OSM',
                                      'OCM'
                              ]
  })
  </code></pre>
  
  <p>I was thinking of a workaround which would get the current options, merged in the new ones and then run <code>setOptions</code>. But <a href="https://stackoverflow.com/q/3369842/684229">there is no clean way to get the google.maps.Map options</a>!</p>
  
  <p>This really seem to suck... this really tempts me to refrain to <a href="https://stackoverflow.com/q/9836185/684229">direct object modification as I asked in another question</a>, but that could be dangerous, right? But it's really hard to program in a clean way with Google maps api v3!!</p>
  
  <p>Any solutions, thoughts, workarounds?</p>