Skip to content

Commit

Permalink
Store and hide zoom control when earth is shown.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Shen committed Apr 5, 2011
1 parent b42c2c2 commit 3242799
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion earth_map_type.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ var EarthMapType = (function () {
ge.NAVIGATION_CONTROL_SMALL;
ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO);
ge.getNavigationControl().setStreetViewEnabled(
map.get('streetViewControl') || map.get('streetViewControl') == null);
map.get('streetViewControl') !== false);
var screenxy = ge.getNavigationControl().getScreenXY();
screenxy.setXUnits(ge.UNITS_PIXELS);
ge.getNavigationControl().setControlType(
Expand All @@ -827,6 +827,8 @@ var EarthMapType = (function () {
}
}
}
map_state.zoomControl = map.get('zoomControl');
map.set('zoomControl', false);

if (this.get('previousMapTypeId') == google.maps.MapTypeId.HYBRID ||
this.get('previousMapTypeId') == google.maps.MapTypeId.ROADMAP ||
Expand Down Expand Up @@ -876,6 +878,7 @@ var EarthMapType = (function () {
function afterTransition() {
var map_state = self.get('map_state');
map.set('scrollwheel', map_state.scrollwheel);
map.set('zoomControl', map_state.zoomControl);
if (transition) {
google.earth.removeEventListener(
ge.getView(), 'viewchangeend', arguments.callee);
Expand Down

0 comments on commit 3242799

Please sign in to comment.