// Copyright 2008 Google Inc.
// All Rights Reserved.
/**
  * @fileoverview Coordinate Display Control
  * 
  * @extends GControl
  * 
  * @author  ( )
  */

/**
  * Coordinate Display Constructor
  * @constructor CoordDisplay
  * @return {Object} The control
  */
function CoordDisplay() {
  return this;
}

CoordDisplay.prototype = new GControl();  // Inherit GControl

/**
  * Initialize function
  * @return {Object} The CoordDisplay Control
  */
CoordDisplay.prototype.initialize = function(map) {
  var me = this;
  me.map_ = map;

  var containerDiv = document.createElement('div');
  containerDiv.innerHTML = '<input type="text" id="skyra" value="" ' +
                           'readonly="true" class="fakeDivDown">' +
                           '&nbsp;<input type="text" id="skydec" value="" ' +
                           'readonly="true" class="fakeDivDown">' + 
                           '&nbsp;&nbsp;<input type="text" id="skystartitle" ' +
                           'value="" readonly="true" class="fakeDivDownB">';
  map.getContainer().appendChild(containerDiv);
  GEvent.addListener(map, "mouseout", eraseInfo);
  GEvent.addListener(map, "mouseover", displayInfo);
  GEvent.addListener(map, "mousemove", displayInfo);
  return containerDiv;
};

/**
  * Returns the default position for the Coverage control
  * @return {GControlPosition} The Coverage control default position.
  */
CoordDisplay.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(70, 10));
};

