/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
- <!-- Copyright 2009 Google Inc. All Rights Reserved. -->
- <!-- License: http://www.apache.org/licenses/LICENSE-2.0 -->
- <script src=../puppet.js></script>
- <script>
- map.api.load();
- /** Test GMenuMapTypeControl. */
- window.onload = function() {
- var changed = false;
- run(map.api.init, -33.95, 151.2, 10);
- run(function() {
- map.api.map.removeMapType(G_HYBRID_MAP);
- map.api.map.addControl(new GMenuMapTypeControl());
- GEvent.addListener(map.api.map, 'maptypechanged', function() {
- changed = true;
- });
- });
- run([shown, mouse], map.map + title('Change map style'), 'mousedown');
- run(find, map.controls.satelliteTiles);
- run(absent, map.controls.hybridTiles);
- run(mouse, map.controls.satelliteTiles, 'mouseup');
- run(wait, function() { return changed; });
- };
- </script>