// X marks the spot; define the X icon
var center_icon = new GIcon();
center_icon.image            = "images/icon_x.gif";
//center_icon.shadow           = "images/shadow_x.png";
center_icon.iconSize         = new GSize(14, 14);
center_icon.shadowSize       = new GSize(14, 14);
center_icon.iconAnchor       = new GPoint(7, 7);
center_icon.infoWindowAnchor = new GPoint(7, 7);


var centermarker;

function markCenter() {
   // draw the reticle as an overlay
   if (centermarker) map.removeOverlay(centermarker);
   centermarker = new GMarker(map.getCenterLatLng(), center_icon );
   map.addOverlay(centermarker);

   // figure the bounds and set the coordinates on the screen
   var center   = map.getCenterLatLng();
   var latblock = document.getElementById('latblock');
   var lonblock = document.getElementById('lonblock');
   latblock.innerHTML = Math.round(center.y*1000000)/1000000;
   lonblock.innerHTML = Math.round(center.x*1000000)/1000000;
}

