﻿var mapdiv; 
var map;

function TextualZoomControl() 
{
}
TextualZoomControl.prototype = new GControl();

TextualZoomControl.prototype.initialize = function(m) 
{
  var container = document.createElement("div");

  var t1 = document.createElement("div");
  this.setButtonStyle_(t1);
  container.appendChild(t1);
  t1.appendChild(document.createTextNode("Térkép"));
  GEvent.addDomListener(t1, "click", function() 
  {
    m.setMapType(G_NORMAL_MAP);
  });

  var t2 = document.createElement("div");
  this.setButtonStyle_(t2);
  container.appendChild(t2);
  t2.appendChild(document.createTextNode("Műhold"));
  GEvent.addDomListener(t2, "click", function() 
  {
    m.setMapType(G_SATELLITE_MAP);
  });

  var t3 = document.createElement("div");
  this.setButtonStyle_(t3);
  container.appendChild(t3);
  t3.appendChild(document.createTextNode("Hibrid"));
  GEvent.addDomListener(t3, "click", function() 
  {
    m.setMapType(G_HYBRID_MAP);
  });

  m.getContainer().appendChild(container);
  return container;
}

TextualZoomControl.prototype.getDefaultPosition = function() 
{
  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 7));
}

TextualZoomControl.prototype.setButtonStyle_ = function(button) 
{
  button.style.color = "#000090";
  button.style.backgroundColor = "#F0F8FF";
  button.style.border = "solid 1px #67BBE4";
  button.style.padding = "4px";
  button.style.marginBottom = "6px";
  button.style.textAlign = "center";
  button.style.cursor = "pointer";
}


 
GMap2.prototype.wheelZoom = function(event) { 
  if (window.event) { 
    event.returnValue = false; // IE 
  } 
  if (event.cancelable) { 
    event.preventDefault();  // DOM-Standard 
  } 
    return false; 
} 



