// Don's Google Map Convenience Functions

function QuickMarker (lat,lon,label)
{
  var new_point = new GLatLng(lat,lon);
  var icon = new GIcon();
  icon.image  = "http://isc.astro.cornell.edu/~don/gps/mm_20_red.png";
  icon.shadow = "http://isc.astro.cornell.edu/~don/gps/mm_20_shadow.png";
  icon.iconSize   = new GSize(12,20);
  icon.shadowSize = new GSize(22,20);
  icon.iconAnchor = new GPoint(6,20);
  icon.infoWindowAnchor = new GPoint(5,1);
  var new_marker = new GMarker(new_point,icon);
  map.addOverlay(new_marker);
  GEvent.addListener(new_marker,"click",function() {
    new_marker.openInfoWindowHtml(label);
  });
}

function QuickMarker2 (lat,lon,color,label)
{
  var new_point = new GLatLng(lat,lon);
  var icon = new GIcon();
  icon.image  = "http://isc.astro.cornell.edu/~don/gps/mm_20_"+color+".png";
  icon.shadow = "http://isc.astro.cornell.edu/~don/gps/mm_20_shadow.png";
  icon.iconSize   = new GSize(12,20);
  icon.shadowSize = new GSize(22,20);
  icon.iconAnchor = new GPoint(6,20);
  icon.infoWindowAnchor = new GPoint(5,1);
  var new_marker = new GMarker(new_point,icon);
  map.addOverlay(new_marker);
  GEvent.addListener(new_marker,"click",function() {
    new_marker.openInfoWindowHtml(label);
  });
}


function AddLatLonDisplay ()
{

  GEvent.addListener(map,'click',function(overlay,point) {
    if (!point) {
      point = map.getCenterLatLng();
    }
    var latLngStr = "Latitude: " + point.y.toFixed(5) + " Longitude: " + point.x.toFixed(5) + "";
    self.status = latLngStr;
  });
}

