/puppet/api/menu_map_type_control.html

http://gmaps-api-issues.googlecode.com/ · HTML · 25 lines · 21 code · 2 blank · 2 comment · 0 complexity · dfcf3df85e7e4edf45f9674432c2cf5e MD5 · raw file

  1. <!-- Copyright 2009 Google Inc. All Rights Reserved. -->
  2. <!-- License: http://www.apache.org/licenses/LICENSE-2.0 -->
  3. <script src=../puppet.js></script>
  4. <script>
  5. map.api.load();
  6. /** Test GMenuMapTypeControl. */
  7. window.onload = function() {
  8. var changed = false;
  9. run(map.api.init, -33.95, 151.2, 10);
  10. run(function() {
  11. map.api.map.removeMapType(G_HYBRID_MAP);
  12. map.api.map.addControl(new GMenuMapTypeControl());
  13. GEvent.addListener(map.api.map, 'maptypechanged', function() {
  14. changed = true;
  15. });
  16. });
  17. run([shown, mouse], map.map + title('Change map style'), 'mousedown');
  18. run(find, map.controls.satelliteTiles);
  19. run(absent, map.controls.hybridTiles);
  20. run(mouse, map.controls.satelliteTiles, 'mouseup');
  21. run(wait, function() { return changed; });
  22. };
  23. </script>